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

Method squareDistanceTo

src/main/java/net/minecraft/util/Vec3.java:120–126  ·  view source on GitHub ↗

The square of the Euclidean distance between this and the specified vector.

(Vec3 vec)

Source from the content-addressed store, hash-verified

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.

Callers 10

pathFollowMethod · 0.95
pathFollowMethod · 0.95
onUpdateMethod · 0.95
onUpdateMethod · 0.95
onUpdateMethod · 0.95
onUpdateMethod · 0.95
checkForStuckMethod · 0.80
collisionRayTraceMethod · 0.80
collisionRayTraceMethod · 0.80
calculateInterceptMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected