public void vecTimesM(Vec r) { this.x *= r.x; this.y *= r.y; this.z *= r.z; }
public double dot(Vec r) { return(this.x * r.x + this.y * r.y + this.z * r.z); }
public void minusM(Vec r) { this.x -= r.x; this.y -= r.y; this.z -= r.z; }
public Vec minus(Vec r) { return(new Vec(x - r.x, y - r.y, z - r.z)); }
public void plusM(Vec r) { x += r.x; y += r.y; z += r.z; }
public Vec plus(Vec r) { return(new Vec(x + r.x, y + r.y, z + r.z)); }
public void minus(Vec r, ref Vec outp) { outp.x = x - r.x; outp.y = y - r.y; outp.z = z - r.z; }