Computes the distance between this point and point p1. @param p1 the other point @return the distance
(Point3f p1)
| 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 | /** |