The square of the Euclidean distance between this and the specified vector.
(Vec3 vec)
| 118 | * The square of the Euclidean distance between this and the specified vector. |
| 119 | */ |
| 120 | public double squareDistanceTo(Vec3 vec) |
| 121 | { |
| 122 | double d0 = vec.xCoord - this.xCoord; |
| 123 | double d1 = vec.yCoord - this.yCoord; |
| 124 | double d2 = vec.zCoord - this.zCoord; |
| 125 | return d0 * d0 + d1 * d1 + d2 * d2; |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * Returns the length of the vector. |
no outgoing calls
no test coverage detected