MCPcopy
hub / github.com/g3n/engine / DistanceTo

Method DistanceTo

math32/vector3.go:369–372  ·  view source on GitHub ↗

DistanceTo returns the distance of this point to other.

(other *Vector3)

Source from the content-addressed store, hash-verified

367
368// DistanceTo returns the distance of this point to other.
369func (v *Vector3) DistanceTo(other *Vector3) float32 {
370
371 return Sqrt(v.DistanceToSquared(other))
372}
373
374// DistanceToSquared returns the distance squared of this point to other.
375func (v *Vector3) DistanceToSquared(other *Vector3) float32 {

Callers 8

DistanceToPointMethod · 0.45
DistanceSqToPointMethod · 0.45
DistanceSqToSegmentMethod · 0.45
DistanceMethod · 0.45
RaycastSpriteMethod · 0.45
RaycastPointsMethod · 0.45
RaycastMeshMethod · 0.45
lineRaycastFunction · 0.45

Calls 2

DistanceToSquaredMethod · 0.95
SqrtFunction · 0.85

Tested by

no test coverage detected