예제 #1
0
 public double length() {
   return Math.sqrt(x * x + y * y + z * z);
 }
예제 #2
0
 public double distanceTo(Coord3 c) {
   return Math.sqrt((x - c.x) * (x - c.x) + (y - c.y) * (y - c.y) + (z - c.z) * (z - c.z));
 }