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