Skip to content
Snippets Groups Projects
Select Git revision
  • 00f86d0a5be55df91a32e752fbf10692b7b1bb98
  • master default protected
2 results

Gemfile

Blame
  • This project manages its dependencies using Bundler. Learn more
    testing.ts 394 B
    import Playground from "./playground";
    import { vecNormalize } from "./utils";
    import { vecLength } from "./utils";
    
    const pg = new Playground();
    
    // Some vectors
    const v = [2,2,3]
    
    const normalized = vecNormalize(v);
    
    console.log(vecLength(normalized));
    
    // Visualize
    pg.gridXZ(); // Grid
    
    pg.visVector(v,{color:"orange",label:"V"});
    pg.visVector(normalized,{color:"red",label:"normalized"});