public P(float x, float y, float z) { this.x = x; this.y = y; this.z = z; }
public float distance(P p) { return distance(p.x, p.y, p.z); }
public float distance(float ox, float oy, float oz) { return (float)Math.sqrt((x-ox)*(x-ox)+(y-oy)*(y-oy)+(z-oz)*(z-oz)); }
public V register() { V v = ps.get(this); return v==null ? new V(this) : v; }
public P times(M m) { return m.times(this); }
public Vec minus(P p) { return new Vec(x-p.x, y-p.y, z-p.z); }
public P(float x, float y, float z) { this.x = x; this.y = y; this.z = z; }
public float distance(P p) { return distance(p.x, p.y, p.z); }
public float distance(float ox, float oy, float oz) { return (float)Math.sqrt((x-ox)*(x-ox)+(y-oy)*(y-oy)+(z-oz)*(z-oz)); }
public V register() { V v = ps.get(this); return v==null ? new V(this) : v; }
public P times(M m) { return m.times(this); }
public Vec minus(P p) { return new Vec(x-p.x, y-p.y, z-p.z); }