Add() public static method

Quaternions are added.
public static Add ( JQuaternion quaternion1, JQuaternion quaternion2 ) : JQuaternion
quaternion1 JQuaternion The first quaternion.
quaternion2 JQuaternion The second quaternion.
return JQuaternion
Ejemplo n.º 1
0
        /// <summary>
        /// Quaternions are added.
        /// </summary>
        /// <param name="quaternion1">The first quaternion.</param>
        /// <param name="quaternion2">The second quaternion.</param>
        /// <returns>The sum of both quaternions.</returns>
        #region public static JQuaternion Add(JQuaternion quaternion1, JQuaternion quaternion2)
        public static JQuaternion Add(JQuaternion quaternion1, JQuaternion quaternion2)
        {
            JQuaternion result;

            JQuaternion.Add(ref quaternion1, ref quaternion2, out result);
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Add two quaternions.
        /// </summary>
        /// <param name="value1">The first quaternion.</param>
        /// <param name="value2">The second quaternion.</param>
        /// <returns>The sum of both quaternions.</returns>
        #region public static double operator +(JQuaternion value1, JQuaternion value2)
        public static JQuaternion operator +(JQuaternion value1, JQuaternion value2)
        {
            JQuaternion result;

            JQuaternion.Add(ref value1, ref value2, out result);
            return(result);
        }