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