Gets the distance to the position. Args: x, y, z
(double x, double y, double z)
| 1399 | * Gets the distance to the position. Args: x, y, z |
| 1400 | */ |
| 1401 | public double getDistance(double x, double y, double z) |
| 1402 | { |
| 1403 | double d0 = this.posX - x; |
| 1404 | double d1 = this.posY - y; |
| 1405 | double d2 = this.posZ - z; |
| 1406 | return MathHelper.sqrt_double(d0 * d0 + d1 * d1 + d2 * d2); |
| 1407 | } |
| 1408 | |
| 1409 | /** |
| 1410 | * Returns the squared distance to the entity. Args: entity |
no test coverage detected