dist2 static method
@param v1 any variable of type PVector @param v2 any variable of type PVector @return the Euclidean distance between v1 and v2
Implementation
static double dist2(PVector v1, PVector v2) {
double dx = v1.x - v2.x;
double dy = v1.y - v2.y;
double dz = v1.z - v2.z;
return math.sqrt(dx * dx + dy * dy + dz * dz);
}