/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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))); }
/// <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)); }
/// <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)); }