MCPcopy Create free account
hub / github.com/SolarLune/masterplan / Distance

Method Distance

utils.go:159–161  ·  view source on GitHub ↗
(other Vector)

Source from the content-addressed store, hash-verified

157}
158
159func (point Vector) Distance(other Vector) float32 {
160 return float32(math.Sqrt(float64(point.DistanceSquared(other))))
161}
162
163func (point Vector) DistanceToRect(rect *sdl.FRect) float32 {
164 closestX := math.Max(float64(rect.X), math.Min(float64(point.X), float64(rect.X+rect.W)))

Callers 7

DistanceToRectMethod · 0.95
LengthMethod · 0.95
NormalizedMethod · 0.95
DrawMethod · 0.80
UpdateMethod · 0.80
DrawMethod · 0.80
showingMethod · 0.80

Calls 1

DistanceSquaredMethod · 0.95

Tested by

no test coverage detected