DistanceToSquared returns the distance squared of this point to other.
(other *Vector3)
| 373 | |
| 374 | // DistanceToSquared returns the distance squared of this point to other. |
| 375 | func (v *Vector3) DistanceToSquared(other *Vector3) float32 { |
| 376 | |
| 377 | dx := v.X - other.X |
| 378 | dy := v.Y - other.Y |
| 379 | dz := v.Z - other.Z |
| 380 | return dx*dx + dy*dy + dz*dz |
| 381 | } |
| 382 | |
| 383 | // SetLength sets this vector to have the specified length. |
| 384 | // If the current length is zero, does nothing. |
no outgoing calls
no test coverage detected