MCPcopy Index your code
hub / github.com/fogleman/ln / Normalize

Method Normalize

ln/vector.go:51–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (a Vector) Normalize() Vector {
52 d := a.Length()
53 return Vector{a.X / d, a.Y / d, a.Z / d}
54}
55
56func (a Vector) Add(b Vector) Vector {
57 return Vector{a.X + b.X, a.Y + b.Y, a.Z + b.Z}

Callers 15

Paths4Method · 0.80
PathsMethod · 0.80
RandomUnitVectorFunction · 0.80
VisibleMethod · 0.80
PathsMethod · 0.80
RotateFunction · 0.80
LookAtFunction · 0.80
MulDirectionMethod · 0.80
PathsMethod · 0.80
mainFunction · 0.80

Calls 1

LengthMethod · 0.95

Tested by

no test coverage detected