diff --git a/Source/OpenTK/Math/Vector2.cs b/Source/OpenTK/Math/Vector2.cs index e21ab7c1..e5d09c27 100644 --- a/Source/OpenTK/Math/Vector2.cs +++ b/Source/OpenTK/Math/Vector2.cs @@ -839,6 +839,32 @@ namespace OpenTK #endregion + #region PerpDot + + /// + /// Calculate the perpendicular dot (scalar) product of two vectors + /// + /// First operand + /// Second operand + /// The perpendicular dot product of the two inputs + public static float PerpDot(Vector2 left, Vector2 right) + { + return left.X * right.Y - left.Y * right.X; + } + + /// + /// Calculate the perpendicular dot (scalar) product of two vectors + /// + /// First operand + /// Second operand + /// The perpendicular dot product of the two inputs + public static void PerpDot(ref Vector2 left, ref Vector2 right, out float result) + { + result = left.X * right.Y - left.Y * right.X; + } + + #endregion + #region Lerp ///