MCPcopy
hub / github.com/EngoEngine/engo / PointDistance

Method PointDistance

math.go:128–130  ·  view source on GitHub ↗

PointDistance returns the euclidean distance between p and p2

(p2 Point)

Source from the content-addressed store, hash-verified

126
127// PointDistance returns the euclidean distance between p and p2
128func (p *Point) PointDistance(p2 Point) float32 {
129 return math.Sqrt(p.PointDistanceSquared(p2))
130}
131
132// PointDistanceSquared returns the squared euclidean distance between p and p2
133func (p *Point) PointDistanceSquared(p2 Point) float32 {

Callers

nothing calls this directly

Calls 2

PointDistanceSquaredMethod · 0.95
SqrtFunction · 0.92

Tested by

no test coverage detected