예제 #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));
 }
예제 #3
0
 public Coord3 eabs() {
   return new Coord3(Math.abs(x), Math.abs(y), Math.abs(z));
 }
예제 #4
0
 public Coord3(Vector3f vec) {
   this.x = (int) Math.floor(vec.x);
   this.y = (int) Math.floor(vec.y);
   this.z = (int) Math.floor(vec.z);
 }