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

Method distance

src/main/java/com/volmit/adapt/util/Point3d.java:122–129  ·  view source on GitHub ↗

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

(Point3d p1)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected