Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/fogleman/ln
/ LengthSquared
Method
LengthSquared
ln/vector.go:32–34 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
30
}
31
32
func
(a Vector) LengthSquared() float64 {
33
return
a.X*a.X + a.Y*a.Y + a.Z*a.Z
34
}
35
36
func
(a Vector) DistanceSquared(b Vector) float64 {
37
return
a.Sub(b).LengthSquared()
Callers
1
DistanceSquared
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected