MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getDistance

Method getDistance

src/main/java/net/minecraft/entity/Entity.java:1401–1407  ·  view source on GitHub ↗

Gets the distance to the position. Args: x, y, z

(double x, double y, double z)

Source from the content-addressed store, hash-verified

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

Callers 2

doExplosionAMethod · 0.95
processCommandMethod · 0.45

Calls 1

sqrt_doubleMethod · 0.95

Tested by

no test coverage detected