distanceTo method

double distanceTo(
  1. Vec3 p
)

Get distance from this point to another point

Implementation

double distanceTo(Vec3 p) {
  final px = p.x;
  final py = p.y;
  final pz = p.z;
  return math.sqrt((px - x) * (px - x) + (py - y) * (py - y) + (pz - z) * (pz - z));
}