public Point(double x, double y, double z) { this((float)x, (float)y, (float)z); }
public Point(float x, float y, float z) { this.x = x; this.y = y; this.z = z; }
- public static final Point ORIGIN = new Point(0,0,0);
-
public float distance(Point p) { return (float)Math.sqrt((x-p.x)*(x-p.x)+(y-p.y)*(y-p.y)+(z-p.z)*(z-p.z)); }
public Vec minus(Point p) { return new Vec(x-p.x, y-p.y, z-p.z); }