Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
Index your code
hub
/
github.com/fogleman/ln
/ Distance
Method
Distance
ln/vector.go:28–30 ·
view source on GitHub ↗
(b Vector)
Source
from the content-addressed store, hash-verified
26
}
27
28
func
(a Vector) Distance(b Vector) float64 {
29
return
a.Sub(b).Length()
30
}
31
32
func
(a Vector) LengthSquared() float64 {
33
return
a.X*a.X + a.Y*a.Y + a.Z*a.Z
Callers
2
SegmentDistance
Method · 0.95
run
Function · 0.95
Calls
2
Sub
Method · 0.95
Length
Method · 0.80
Tested by
no test coverage detected