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

Method distanceSq

src/main/java/net/minecraft/util/Vec3i.java:97–103  ·  view source on GitHub ↗

Calculate squared distance to the given coordinates @param toX X Coordinate @param toY Y Coordinate @param toZ Z Coordinate

(double toX, double toY, double toZ)

Source from the content-addressed store, hash-verified

95 * @param toZ Z Coordinate
96 */
97 public double distanceSq(double toX, double toY, double toZ)
98 {
99 double d0 = (double)this.getX() - toX;
100 double d1 = (double)this.getY() - toY;
101 double d2 = (double)this.getZ() - toZ;
102 return d0 * d0 + d1 * d1 + d2 * d2;
103 }
104
105 /**
106 * Compute square of distance from point x, y, z to center of this Block

Callers 15

setupTerrainMethod · 0.80
func_179866_aMethod · 0.80
getExistedDoorMethod · 0.80
getNearestVillageMethod · 0.80
getDistanceSquaredMethod · 0.80
findChunksForSpawningMethod · 0.80
placeInExistingPortalMethod · 0.80
spawnParticleMethod · 0.80
generateMethod · 0.80

Calls 6

getXMethod · 0.95
getYMethod · 0.95
getZMethod · 0.95
getXMethod · 0.65
getYMethod · 0.65
getZMethod · 0.65

Tested by

no test coverage detected