MCPcopy
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
36func (a Vector) DistanceSquared(b Vector) float64 {
37 return a.Sub(b).LengthSquared()
38}
39
40func (a Vector) Dot(b Vector) float64 {
41 return a.X*b.X + a.Y*b.Y + a.Z*b.Z

Callers 1

SegmentDistanceMethod · 0.80

Calls 2

SubMethod · 0.95
LengthSquaredMethod · 0.80

Tested by

no test coverage detected