Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
51
func
(a Vector) Normalize() Vector {
52
d := a.Length()
53
return
Vector{a.X / d, a.Y / d, a.Z / d}
54
}
55
56
func
(a Vector) Add(b Vector) Vector {
57
return
Vector{a.X + b.X, a.Y + b.Y, a.Z + b.Z}
Callers
15
Paths4
Method · 0.80
Paths
Method · 0.80
RandomUnitVector
Function · 0.80
Visible
Method · 0.80
Paths
Method · 0.80
NewTransformedOutlineCone
Function · 0.80
Rotate
Function · 0.80
LookAt
Function · 0.80
MulDirection
Method · 0.80
Paths
Method · 0.80
NewTransformedOutlineCylinder
Function · 0.80
main
Function · 0.80
Calls
1
Length
Method · 0.95
Tested by
no test coverage detected