MCPcopy Create free account
hub / github.com/VolmitSoftware/Adapt / distance

Method distance

src/main/java/com/volmit/adapt/util/Point3f.java:124–131  ·  view source on GitHub ↗

Computes the distance between this point and point p1. @param p1 the other point @return the distance

(Point3f p1)

Source from the content-addressed store, hash-verified

122 * @return the distance
123 */
124 public final float distance(Point3f p1) {
125 float dx, dy, dz;
126
127 dx = this.x - p1.x;
128 dy = this.y - p1.y;
129 dz = this.z - p1.z;
130 return (float) Math.sqrt(dx * dx + dy * dy + dz * dz);
131 }
132
133
134 /**

Callers

nothing calls this directly

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected