Returns the distance between this point and point p1. @param p1 the first point @return the distance between these this point and point p1.
(Point4d p1)
| 153 | * @return the distance between these this point and point p1. |
| 154 | */ |
| 155 | public final double distance(Point4d p1) { |
| 156 | double dx, dy, dz, dw; |
| 157 | |
| 158 | dx = this.x - p1.x; |
| 159 | dy = this.y - p1.y; |
| 160 | dz = this.z - p1.z; |
| 161 | dw = this.w - p1.w; |
| 162 | return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw); |
| 163 | } |
| 164 | |
| 165 | |
| 166 | /** |