Example #1
0
        /// <summary>
        /// Calculates the component-wise maximum of two vectors.
        /// </summary>
        /// <param name="left">A vector.</param>
        /// <param name="right">Another vector.</param>
        /// <param name="result">The component-wise maximum of the two vectors.</param>
        internal static void ComponentMax(ref Vector3 left, ref Vector3 right, out Vector3 result)
        {
#if OPENTK || STANDALONE
            Vector3.ComponentMax(ref left, ref right, out result);
#elif UNITY3D
            result = Vector3.Min(left, right);
#else
            Vector3.Max(ref left, ref right, out result);
#endif
        }
Example #2
0
        /// <summary>
        /// Calculates the component-wise maximum of two vectors.
        /// </summary>
        /// <param name="left">A vector.</param>
        /// <param name="right">Another vector.</param>
        /// <param name="result">The component-wise maximum of the two vectors.</param>
        internal static void ComponentMax(ref Vector3 left, ref Vector3 right, out Vector3 result)
        {
#if OPENTK || STANDALONE
            Vector3.ComponentMax(ref left, ref right, out result);
#elif UNITY3D
            result = Vector3.Min(left, right);
#else
            result = new Vector3(
                Math.Max(left.X, right.X),
                Math.Max(left.Y, right.Y),
                Math.Max(left.Z, right.Z)
                );
#endif
        }
Example #3
0
 public static Vector3 Min(Vector3 left, Vector3 right)
 {
     return(new Vector3(MonoGameVector3.Min(left.MonoGameVector, right.MonoGameVector)));
 }