/// <summary> /// Calculates the dot product of two vectors. /// </summary> /// <param name="value1">The first vector.</param> /// <param name="value2">The second vector.</param> /// <returns>Returns the dot product of both.</returns> #region public static float operator *(JVector value1, JVector value2) public static float operator *(JVector value1, JVector value2) { return(JVector.Dot(ref value1, ref value2)); }
internal static JVector Clamp(JVector v, float len) { return((JVector.Dot(v, v) > len * len) ? JVector.Multiply(JVector.Normalize(v), len) : v); }
/// <summary> /// Calculates the dot product of two vectors. /// </summary> /// <param name="vector1">The first vector.</param> /// <param name="vector2">The second vector.</param> /// <returns>Returns the dot product of both vectors.</returns> #region public static float Dot(JVector vector1, JVector vector2) public static float Dot(JVector vector1, JVector vector2) { return(JVector.Dot(ref vector1, ref vector2)); }