Skip to content
Snippets Groups Projects
Select Git revision
  • eab492f617ea545c70c094d393798957e5c82997
  • main default protected
2 results

README.md

Blame
  • 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"});