public static CameraSpacePoint Norm(this CameraSpacePoint cur) { float mag = cur.Magnitude(); return(new CameraSpacePoint() { X = cur.X / mag, Y = cur.Y / mag, Z = cur.Z / mag }); }
public static float AngleBetween(this CameraSpacePoint cur, CameraSpacePoint other) { float curMag = cur.Magnitude(); float othMag = other.Magnitude(); float angle = (float)(Math.Atan(cur.DotProduct(other) / (curMag * othMag)) * 180 / Math.PI); return(angle); }