public static float Dot(Vector v, Normal n) { if (v.HasNaNs() || n.HasNaNs()) throw new InvalidOperationException(); return v.x * n.x + v.y * n.y + v.z * n.z; }
public static float Dot(Normal n, Vector v) { if (n.HasNaNs() || v.HasNaNs()) throw new InvalidOperationException(); return n.x * v.x + n.y * v.y + n.z * v.z; }
public static Vector Cross(Vector v1, Vector v2) { if (v1.HasNaNs() || v2.HasNaNs()) throw new InvalidOperationException(); return new Vector((v1.y * v2.z) - (v1.z * v2.y), (v1.z * v2.x) - (v1.x * v2.z), (v1.x * v2.y) - (v1.y * v2.x)); }
public static float Dot(Vector v1, Vector v2) { if (v1.HasNaNs() || v2.HasNaNs()) throw new InvalidOperationException(); return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; }
public static float AbsDot(Vector v1, Vector v2) { if (v1.HasNaNs() || v2.HasNaNs()) throw new InvalidOperationException(); return Math.Abs(Dot(v1, v2)); }