예제 #1
0
 /// <summary>
 /// Multiplies a quaternion by a scalar.
 /// </summary>
 /// <param name="q">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="s">A scalar.</param>
 /// <returns>A <see cref="QuaternionD"/> instance to hold the result.</returns>
 public static QuaternionD operator*(QuaternionD q, double s)
 {
     return(QuaternionD.Multiply(q, s));
 }
예제 #2
0
 /// <summary>
 /// Divides a scalar by a quaternion.
 /// </summary>
 /// <param name="q">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="s">A scalar.</param>
 /// <returns>A <see cref="QuaternionD"/> instance to hold the result.</returns>
 public static QuaternionD operator/(double s, QuaternionD q)
 {
     return(QuaternionD.Multiply(q, 1 / s));
 }
예제 #3
0
 /// <summary>
 /// Multiplies quaternion <paramref name="a"/> by quaternion <paramref name="b"/>.
 /// </summary>
 /// <param name="a">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="b">A <see cref="QuaternionD"/> instance.</param>
 /// <returns>A new <see cref="QuaternionD"/> containing the result.</returns>
 public static QuaternionD operator*(QuaternionD a, QuaternionD b)
 {
     return(QuaternionD.Multiply(a, b));
 }
예제 #4
0
 /// <summary>
 /// Rotate
 /// </summary>
 /// <param name="quat"></param>
 /// <param name="v"></param>
 /// <returns></returns>
 public static Vector3D operator *(QuaternionD quat, Vector3D v)
 {
     return(QuaternionD.Multiply(quat, v));
 }
예제 #5
0
 /// <summary>
 /// Divides a scalar by a quaternion.
 /// </summary>
 /// <param name="quaternion">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="scalar">A scalar.</param>
 /// <returns>A <see cref="QuaternionD"/> instance to hold the result.</returns>
 public static QuaternionD operator /(double scalar, QuaternionD quaternion)
 {
     return(QuaternionD.Multiply(quaternion, (1.0 / scalar)));
 }
예제 #6
0
 /// <summary>
 /// Multiplies a quaternion by a scalar.
 /// </summary>
 /// <param name="quaternion">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="scalar">A scalar.</param>
 /// <returns>A <see cref="QuaternionD"/> instance to hold the result.</returns>
 public static QuaternionD operator *(QuaternionD quaternion, double scalar)
 {
     return(QuaternionD.Multiply(quaternion, scalar));
 }
예제 #7
0
 /// <summary>
 /// Multiplies quaternion <paramref name="a"/> by quaternion <paramref name="b"/>.
 /// </summary>
 /// <param name="left">A <see cref="QuaternionD"/> instance.</param>
 /// <param name="right">A <see cref="QuaternionD"/> instance.</param>
 /// <returns>A new <see cref="QuaternionD"/> containing the result.</returns>
 public static QuaternionD operator *(QuaternionD left, QuaternionD right)
 {
     return(QuaternionD.Multiply(left, right));
 }