MCPcopy
hub / github.com/bbycroft/llm-viz / normalize

Method normalize

src/utils/vector.ts:56–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 len(): number { return Math.sqrt(this.lenSq()); }
55 dist(a: Vec3): number { return Math.sqrt(this.distSq(a)); }
56 normalize(): Vec3 { return this.mul(1.0 / Math.sqrt(this.lenSq())); }
57 mid(a: Vec3): Vec3 { return new Vec3((this.x + a.x) * 0.5, (this.y + a.y) * 0.5, (this.z + a.z) * 0.5); }
58 abs() { return new Vec3(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z)); }
59 clone(): Vec3 { return new Vec3(this.x, this.y, this.z); }

Callers 15

fromLookAtMethod · 0.45
fromAxisAngleFunction · 0.45
testFunction · 0.45
runMouseHitTestingFunction · 0.45
applySpringStepFunction · 0.45
addSourceDestCurveLineFunction · 0.45
drawArrowFunction · 0.45
renderArrowFunction · 0.45
drawArrowFunction · 0.45
drawArcFunction · 0.45
renderWireFunction · 0.45
handleWireExtendDragFunction · 0.45

Calls 2

mulMethod · 0.95
lenSqMethod · 0.95

Tested by 1

testFunction · 0.36