Compute square of distance from point x, y, z to center of this Block
(double xIn, double yIn, double zIn)
| 106 | * Compute square of distance from point x, y, z to center of this Block |
| 107 | */ |
| 108 | public double distanceSqToCenter(double xIn, double yIn, double zIn) |
| 109 | { |
| 110 | double d0 = (double)this.getX() + 0.5D - xIn; |
| 111 | double d1 = (double)this.getY() + 0.5D - yIn; |
| 112 | double d2 = (double)this.getZ() + 0.5D - zIn; |
| 113 | return d0 * d0 + d1 * d1 + d2 * d2; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * Calculate squared distance to the given Vector |
no test coverage detected