GitHub PullRequestReviewCommentEvent at 2014-04-01 01:45:45
Repository: MonoGame
Actor: flibitijibibo
Payload: {"comment":{"url":"https://api.github.com/repos/flibitijibibo/MonoGame/pulls/comments/11145057","id":11145057,"diff_hunk":"@@ -42,570 +42,672 @@ MIT License\n \n namespace Microsoft.Xna.Framework\n {\n-    [DataContract]\n-    [TypeConverter(typeof(XNAVector2Converter))]\n-    public struct Vector2 : IEquatable<Vector2>\n-    {\n-        #region Public Static Properties\n+\t[DataContract]\n+\t[TypeConverter(typeof(XNAVector2Converter))]\n+\tpublic struct Vector2 : IEquatable<Vector2>\n+\t{\n+\t\t#region Public Static Properties\n+\n+\t\tpublic static Vector2 Zero\n+\t\t{\n+\t\t\tget\n+\t\t\t{\n+\t\t\t\treturn zeroVector;\n+\t\t\t}\n+\t\t}\n \n-        public static Vector2 Zero\n-        {\n-            get { return zeroVector; }\n-        }\n+\t\tpublic static Vector2 One\n+\t\t{\n+\t\t\tget\n+\t\t\t{\n+\t\t\t\treturn unitVector;\n+\t\t\t}\n+\t\t}\n \n-        public static Vector2 One\n-        {\n-            get { return unitVector; }\n-        }\n+\t\tpublic static Vector2 UnitX\n+\t\t{\n+\t\t\tget\n+\t\t\t{\n+\t\t\t\treturn unitXVector;\n+\t\t\t}\n+\t\t}\n \n-        public static Vector2 UnitX\n-        {\n-            get { return unitXVector; }\n-        }\n+\t\tpublic static Vector2 UnitY\n+\t\t{\n+\t\t\tget\n+\t\t\t{\n+\t\t\t\treturn unitYVector;\n+\t\t\t}\n+\t\t}\n \n-        public static Vector2 UnitY\n-        {\n-            get { return unitYVector; }\n-        }\n+\t\t#endregion\n \n-        #endregion\n+\t\t#region Public Fields\n \n-        #region Public Fields\n+\t\t[DataMember]\n+\t\tpublic float X;\n \n-        [DataMember]\n-        public float X;\n+\t\t[DataMember]\n+\t\tpublic float Y;\n \n-        [DataMember]\n-        public float Y;\n+\t\t#endregion\n \n-        #endregion\n+\t\t#region Private Static Fields\n \n-        #region Private Static Fields\n+\t\tprivate static Vector2 zeroVector = new Vector2(0f, 0f);\n+\t\tprivate static Vector2 unitVector = new Vector2(1f, 1f);\n+\t\tprivate static Vector2 unitXVector = new Vector2(1f, 0f);\n+\t\tprivate static Vector2 unitYVector = new Vector2(0f, 1f);\n \n-        private static Vector2 zeroVector = new Vector2(0f, 0f);\n-        private static Vector2 unitVector = new Vector2(1f, 1f);\n-        private static Vector2 unitXVector = new Vector2(1f, 0f);\n-        private static Vector2 unitYVector = new Vector2(0f, 1f);\n+\t\t#endregion\n \n-        #endregion\n+\t\t#region Public Constructors\n \n-        #region Public Constructors\n+\t\tpublic Vector2(float x, float y)\n+\t\t{\n+\t\t\tthis.X = x;\n+\t\t\tthis.Y = y;\n+\t\t}\n \n-        public Vector2(float x, float y)\n-        {\n-            this.X = x;\n-            this.Y = y;\n-        }\n-\t\t \n-        public Vector2(float value)\n-        {\n-            this.X = value;\n-            this.Y = value;\n-        }\n+\t\tpublic Vector2(float value)\n+\t\t{\n+\t\t\tthis.X = value;\n+\t\t\tthis.Y = value;\n+\t\t}\n \n-        #endregion\n+\t\t#endregion\n \n-        #region Public Methods\n+\t\t#region Public Methods\n \n-        public override bool Equals(object obj)\n-        {\n+\t\tpublic override bool Equals(object obj)\n+\t\t{\n \t\t\tif(obj is Vector2)\n \t\t\t{\n \t\t\t\treturn Equals((Vector2)obj);\n \t\t\t}\n-\t\t\t\n-            return false;\n-        }\n-\n-        public bool Equals(Vector2 other)\n-        {\n-            return (X == other.X) && (Y == other.Y);\n-        }\n-\t\t\n-        public override int GetHashCode()\n-        {\n-            return X.GetHashCode() + Y.GetHashCode();\n-        }\n-\n-        public float Length()\n-        {\n-\t\t\treturn (float)Math.Sqrt((X * X) + (Y * Y));\n-        }\n-\n-        public float LengthSquared()\n-        {\n+\n+\t\t\treturn false;\n+\t\t}\n+\n+\t\tpublic bool Equals(Vector2 other)\n+\t\t{\n+\t\t\treturn (X == other.X) && (Y == other.Y);\n+\t\t}\n+\n+\t\tpublic override int GetHashCode()\n+\t\t{\n+\t\t\treturn X.GetHashCode() + Y.GetHashCode();\n+\t\t}\n+\n+\t\tpublic float Length()\n+\t\t{\n+\t\t\treturn (float) Math.Sqrt((X * X) + (Y * Y));\n+\t\t}\n+\n+\t\tpublic float LengthSquared()\n+\t\t{\n \t\t\treturn (X * X) + (Y * Y);\n-        }\n+\t\t}\n \n-        public void Normalize()\n-        {\n-\t\t\tfloat val = 1.0f / (float)Math.Sqrt((X * X) + (Y * Y));\n+\t\tpublic void Normalize()\n+\t\t{\n+\t\t\tfloat val = 1.0f / (float) Math.Sqrt((X * X) + (Y * Y));\n \t\t\tX *= val;\n \t\t\tY *= val;\n-        }\n+\t\t}\n \n-        public override string ToString()\n-        {\n+\t\tpublic override string ToString()\n+\t\t{\n \t\t\tCultureInfo currentCulture = CultureInfo.CurrentCulture;\n-        \treturn string.Format(currentCulture, \"{{X:{0} Y:{1}}}\", new object[] { \n-\t\t\t\tthis.X.ToString(currentCulture), this.Y.ToString(currentCulture) });\n-        }\n-\n-        #endregion\n-\n-        #region Public Static Methods\n-\n-        public static Vector2 Add(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X += value2.X;\n-            value1.Y += value2.Y;\n-            return value1;\n-        }\n-\n-        public static void Add(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X + value2.X;\n-            result.Y = value1.Y + value2.Y;\n-        }\n-\n-        public static Vector2 Barycentric(Vector2 value1, Vector2 value2, Vector2 value3, float amount1, float amount2)\n-        {\n-            return new Vector2(\n-                MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),\n-                MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2));\n-        }\n-\n-        public static void Barycentric(ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, float amount1, float amount2, out Vector2 result)\n-        {\n-            result = new Vector2(\n-                MathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),\n-                MathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2));\n-        }\n-\n-        public static Vector2 CatmullRom(Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount)\n-        {\n-            return new Vector2(\n-                MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),\n-                MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount));\n-        }\n-\n-        public static void CatmullRom(ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, ref Vector2 value4, float amount, out Vector2 result)\n-        {\n-            result = new Vector2(\n-                MathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),\n-                MathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount));\n-        }\n-\n-        public static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max)\n-        {\n-            return new Vector2(\n-                MathHelper.Clamp(value1.X, min.X, max.X),\n-                MathHelper.Clamp(value1.Y, min.Y, max.Y));\n-        }\n-\n-        public static void Clamp(ref Vector2 value1, ref Vector2 min, ref Vector2 max, out Vector2 result)\n-        {\n-            result = new Vector2(\n-                MathHelper.Clamp(value1.X, min.X, max.X),\n-                MathHelper.Clamp(value1.Y, min.Y, max.Y));\n-        }\n-\n-        public static float Distance(Vector2 value1, Vector2 value2)\n-        {\n-            float v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n-            return (float)Math.Sqrt((v1 * v1) + (v2 * v2));\n-        }\n-\n-        public static void Distance(ref Vector2 value1, ref Vector2 value2, out float result)\n-        {\n-            float v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n-            result = (float)Math.Sqrt((v1 * v1) + (v2 * v2));\n-        }\n-\n-        public static float DistanceSquared(Vector2 value1, Vector2 value2)\n-        {\n-            float v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n-            return (v1 * v1) + (v2 * v2);\n-        }\n-\n-        public static void DistanceSquared(ref Vector2 value1, ref Vector2 value2, out float result)\n-        {\n-            float v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n-            result = (v1 * v1) + (v2 * v2);\n-        }\n-\n-        public static Vector2 Divide(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X /= value2.X;\n-            value1.Y /= value2.Y;\n-            return value1;\n-        }\n-\n-        public static void Divide(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X / value2.X;\n-            result.Y = value1.Y / value2.Y;\n-        }\n-\n-        public static Vector2 Divide(Vector2 value1, float divider)\n-        {\n-            float factor = 1 / divider;\n-            value1.X *= factor;\n-            value1.Y *= factor;\n-            return value1;\n-        }\n-\n-        public static void Divide(ref Vector2 value1, float divider, out Vector2 result)\n-        {\n-            float factor = 1 / divider;\n-            result.X = value1.X * factor;\n-            result.Y = value1.Y * factor;\n-        }\n-\n-        public static float Dot(Vector2 value1, Vector2 value2)\n-        {\n-            return (value1.X * value2.X) + (value1.Y * value2.Y);\n-        }\n-\n-        public static void Dot(ref Vector2 value1, ref Vector2 value2, out float result)\n-        {\n-            result = (value1.X * value2.X) + (value1.Y * value2.Y);\n-        }\n-\n-        public static Vector2 Reflect(Vector2 vector, Vector2 normal)\n-        {\n-            Vector2 result;\n-            float val = 2.0f * ((vector.X * normal.X) + (vector.Y * normal.Y));\n-            result.X = vector.X - (normal.X * val);\n-            result.Y = vector.Y - (normal.Y * val);\n-            return result;\n-        }\n-\n-        public static void Reflect(ref Vector2 vector, ref Vector2 normal, out Vector2 result)\n-        {\n-            float val = 2.0f * ((vector.X * normal.X) + (vector.Y * normal.Y));\n-            result.X = vector.X - (normal.X * val);\n-            result.Y = vector.Y - (normal.Y * val);\n-        }\n-\n-        public static Vector2 Hermite(Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount)\n-        {\n-            Vector2 result = new Vector2();\n-            Hermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result);\n-            return result;\n-        }\n-\n-        public static void Hermite(ref Vector2 value1, ref Vector2 tangent1, ref Vector2 value2, ref Vector2 tangent2, float amount, out Vector2 result)\n-        {\n-            result.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount);\n-            result.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount);\n-        }\n-\n-        public static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)\n-        {\n-            return new Vector2(\n-                MathHelper.Lerp(value1.X, value2.X, amount),\n-                MathHelper.Lerp(value1.Y, value2.Y, amount));\n-        }\n-\n-        public static void Lerp(ref Vector2 value1, ref Vector2 value2, float amount, out Vector2 result)\n-        {\n-            result = new Vector2(\n-                MathHelper.Lerp(value1.X, value2.X, amount),\n-                MathHelper.Lerp(value1.Y, value2.Y, amount));\n-        }\n-\n-        public static Vector2 Max(Vector2 value1, Vector2 value2)\n-        {\n-            return new Vector2(value1.X > value2.X ? value1.X : value2.X,\n-                               value1.Y > value2.Y ? value1.Y : value2.Y);\n-        }\n-\n-        public static void Max(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X > value2.X ? value1.X : value2.X;\n-            result.Y = value1.Y > value2.Y ? value1.Y : value2.Y;\n-        }\n-\n-        public static Vector2 Min(Vector2 value1, Vector2 value2)\n-        {\n-            return new Vector2(value1.X < value2.X ? value1.X : value2.X,\n-                               value1.Y < value2.Y ? value1.Y : value2.Y);\n-        }\n-\n-        public static void Min(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X < value2.X ? value1.X : value2.X;\n-            result.Y = value1.Y < value2.Y ? value1.Y : value2.Y;\n-        }\n-\n-        public static Vector2 Multiply(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X *= value2.X;\n-            value1.Y *= value2.Y;\n-            return value1;\n-        }\n-\n-        public static Vector2 Multiply(Vector2 value1, float scaleFactor)\n-        {\n-            value1.X *= scaleFactor;\n-            value1.Y *= scaleFactor;\n-            return value1;\n-        }\n-\n-        public static void Multiply(ref Vector2 value1, float scaleFactor, out Vector2 result)\n-        {\n-            result.X = value1.X * scaleFactor;\n-            result.Y = value1.Y * scaleFactor;\n-        }\n-\n-        public static void Multiply(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X * value2.X;\n-            result.Y = value1.Y * value2.Y;\n-        }\n-\n-        public static Vector2 Negate(Vector2 value)\n-        {\n-            value.X = -value.X;\n-            value.Y = -value.Y;\n-            return value;\n-        }\n-\n-        public static void Negate(ref Vector2 value, out Vector2 result)\n-        {\n-            result.X = -value.X;\n-            result.Y = -value.Y;\n-        }\n-\n-        public static Vector2 Normalize(Vector2 value)\n-        {\n-            float val = 1.0f / (float)Math.Sqrt((value.X * value.X) + (value.Y * value.Y));\n-            value.X *= val;\n-            value.Y *= val;\n-            return value;\n-        }\n-\n-        public static void Normalize(ref Vector2 value, out Vector2 result)\n-        {\n-            float val = 1.0f / (float)Math.Sqrt((value.X * value.X) + (value.Y * value.Y));\n-            result.X = value.X * val;\n-            result.Y = value.Y * val;\n-        }\n-\n-        public static Vector2 SmoothStep(Vector2 value1, Vector2 value2, float amount)\n-        {\n-            return new Vector2(\n-                MathHelper.SmoothStep(value1.X, value2.X, amount),\n-                MathHelper.SmoothStep(value1.Y, value2.Y, amount));\n-        }\n-\n-        public static void SmoothStep(ref Vector2 value1, ref Vector2 value2, float amount, out Vector2 result)\n-        {\n-            result = new Vector2(\n-                MathHelper.SmoothStep(value1.X, value2.X, amount),\n-                MathHelper.SmoothStep(value1.Y, value2.Y, amount));\n-        }\n-\n-        public static Vector2 Subtract(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X -= value2.X;\n-            value1.Y -= value2.Y;\n-            return value1;\n-        }\n-\n-        public static void Subtract(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n-        {\n-            result.X = value1.X - value2.X;\n-            result.Y = value1.Y - value2.Y;\n-        }\n-\n-        public static Vector2 Transform(Vector2 position, Matrix matrix)\n-        {\n-            Transform(ref position, ref matrix, out position);\n-            return position;\n-        }\n-\n-        public static void Transform(ref Vector2 position, ref Matrix matrix, out Vector2 result)\n-        {\n-            result = new Vector2((position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M41,\n-                                 (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M42);\n-        }\n-\n-        public static Vector2 Transform(Vector2 position, Quaternion quat)\n-        {\n-            Transform(ref position, ref quat, out position);\n-            return position;\n-        }\n-\n-        public static void Transform(ref Vector2 position, ref Quaternion quat, out Vector2 result)\n-        {\n-            Quaternion v = new Quaternion(position.X, position.Y, 0, 0), i, t;\n-            Quaternion.Inverse(ref quat, out i);\n-            Quaternion.Multiply(ref quat, ref v, out t);\n-            Quaternion.Multiply(ref t, ref i, out v);\n-\n-            result = new Vector2(v.X, v.Y);\n-        }\n-\n-        public static void Transform(\n-            Vector2[] sourceArray,\n-            ref Matrix matrix,\n-            Vector2[] destinationArray)\n-        {\n-            Transform(sourceArray, 0, ref matrix, destinationArray, 0, sourceArray.Length);\n-        }\n-\n-\n-        public static void Transform(\n-            Vector2[] sourceArray,\n-            int sourceIndex,\n-            ref Matrix matrix,\n-            Vector2[] destinationArray,\n-            int destinationIndex,\n-            int length)\n-        {\n-            for (int x = 0; x < length; x++)\n-            {\n-                var position = sourceArray[sourceIndex + x];\n-                var destination = destinationArray[destinationIndex + x];\n-                destination.X = (position.X * matrix.M11) + (position.Y * matrix.M21) + matrix.M41;\n-                destination.Y = (position.X * matrix.M12) + (position.Y * matrix.M22) + matrix.M42;\n-                destinationArray[destinationIndex + x] = destination;\n-            }\n-        }\n-\n-        public static Vector2 TransformNormal(Vector2 normal, Matrix matrix)\n-        {\n-            Vector2.TransformNormal(ref normal, ref matrix, out normal);\n-            return normal;\n-        }\n-\n-        public static void TransformNormal(ref Vector2 normal, ref Matrix matrix, out Vector2 result)\n-        {\n-            result = new Vector2((normal.X * matrix.M11) + (normal.Y * matrix.M21),\n-                                 (normal.X * matrix.M12) + (normal.Y * matrix.M22));\n-        }\n-\n-        #endregion\n-\n-        #region Public Static Operators\n-\n-        public static Vector2 operator -(Vector2 value)\n-        {\n-            value.X = -value.X;\n-            value.Y = -value.Y;\n-            return value;\n-        }\n-\n-\n-        public static bool operator ==(Vector2 value1, Vector2 value2)\n-        {\n-            return value1.X == value2.X && value1.Y == value2.Y;\n-        }\n-\n-\n-        public static bool operator !=(Vector2 value1, Vector2 value2)\n-        {\n-            return value1.X != value2.X || value1.Y != value2.Y;\n-        }\n-\n-\n-        public static Vector2 operator +(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X += value2.X;\n-            value1.Y += value2.Y;\n-            return value1;\n-        }\n-\n-\n-        public static Vector2 operator -(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X -= value2.X;\n-            value1.Y -= value2.Y;\n-            return value1;\n-        }\n-\n-\n-        public static Vector2 operator *(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X *= value2.X;\n-            value1.Y *= value2.Y;\n-            return value1;\n-        }\n-\n-\n-        public static Vector2 operator *(Vector2 value, float scaleFactor)\n-        {\n-            value.X *= scaleFactor;\n-            value.Y *= scaleFactor;\n-            return value;\n-        }\n-\n-\n-        public static Vector2 operator *(float scaleFactor, Vector2 value)\n-        {\n-            value.X *= scaleFactor;\n-            value.Y *= scaleFactor;\n-            return value;\n-        }\n-\n-\n-        public static Vector2 operator /(Vector2 value1, Vector2 value2)\n-        {\n-            value1.X /= value2.X;\n-            value1.Y /= value2.Y;\n-            return value1;\n-        }\n-\n-\n-        public static Vector2 operator /(Vector2 value1, float divider)\n-        {\n-            float factor = 1 / divider;\n-            value1.X *= factor;\n-            value1.Y *= factor;\n-            return value1;\n-        }\n-\n-        #endregion\n-    }\n-\n-    public class XNAVector2Converter : TypeConverter\n-    {\n-        #region Public Methods\n-\n-        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)\n-        {\n-            if (sourceType == typeof(string))\n-            {\n-                return true;\n-            }\n-            return base.CanConvertFrom(context, sourceType);\n-        }\n-\n-        public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value)\n-        {\n-            if (value is string)\n-            {\n-                string[] v = ((string) value).Split(culture.NumberFormat.NumberGroupSeparator.ToCharArray());\n-                return new Vector2(\n-                    float.Parse(v[0], culture),\n-                    float.Parse(v[1], culture)\n-                );\n-            }\n-            return base.ConvertFrom(context, culture, value);\n-        }\n-\n-        public override object ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value, Type destinationType)\n-        {\n-            if (destinationType == typeof(string))\n-            {\n-                Vector2 src = (Vector2) value;\n-                return src.X.ToString(culture) + culture.NumberFormat.NumberGroupSeparator + src.Y.ToString(culture);\n-            }\n-            return base.ConvertTo(context, culture, value, destinationType);\n-        }\n-\n-        #endregion\n-    }\n+\t\t\treturn string.Format(\n+\t\t\t\tcurrentCulture,\n+\t\t\t\t\"{{X:{0} Y:{1}}}\",\n+\t\t\t\tnew object[] {\n+\t\t\t\t\tthis.X.ToString(currentCulture),\n+\t\t\t\t\tthis.Y.ToString(currentCulture)\n+\t\t\t\t}\n+\t\t\t);\n+\t\t}\n+\n+\t\t#endregion\n+\n+\t\t#region Public Static Methods\n+\n+\t\tpublic static Vector2 Add(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\tvalue1.X += value2.X;\n+\t\t\tvalue1.Y += value2.Y;\n+\t\t\treturn value1;\n+\t\t}\n+\n+\t\tpublic static void Add(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n+\t\t{\n+\t\t\tresult.X = value1.X + value2.X;\n+\t\t\tresult.Y = value1.Y + value2.Y;\n+\t\t}\n+\n+\t\tpublic static Vector2 Barycentric(\n+\t\t\tVector2 value1,\n+\t\t\tVector2 value2,\n+\t\t\tVector2 value3,\n+\t\t\tfloat amount1,\n+\t\t\tfloat amount2\n+\t\t) {\n+\t\t\treturn new Vector2(\n+\t\t\t\tMathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),\n+\t\t\t\tMathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static void Barycentric(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 value2,\n+\t\t\tref Vector2 value3,\n+\t\t\tfloat amount1,\n+\t\t\tfloat amount2,\n+\t\t\tout Vector2 result\n+\t\t) {\n+\t\t\tresult = new Vector2(\n+\t\t\t\tMathHelper.Barycentric(value1.X, value2.X, value3.X, amount1, amount2),\n+\t\t\t\tMathHelper.Barycentric(value1.Y, value2.Y, value3.Y, amount1, amount2)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static Vector2 CatmullRom(\n+\t\t\tVector2 value1,\n+\t\t\tVector2 value2,\n+\t\t\tVector2 value3,\n+\t\t\tVector2 value4,\n+\t\t\tfloat amount\n+\t\t) {\n+\t\t\treturn new Vector2(\n+\t\t\t\tMathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),\n+\t\t\t\tMathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static void CatmullRom(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 value2,\n+\t\t\tref Vector2 value3,\n+\t\t\tref Vector2 value4,\n+\t\t\tfloat amount,\n+\t\t\tout Vector2 result\n+\t\t) {\n+\t\t\tresult = new Vector2(\n+\t\t\t\tMathHelper.CatmullRom(value1.X, value2.X, value3.X, value4.X, amount),\n+\t\t\t\tMathHelper.CatmullRom(value1.Y, value2.Y, value3.Y, value4.Y, amount)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max)\n+\t\t{\n+\t\t\treturn new Vector2(\n+\t\t\t\tMathHelper.Clamp(value1.X, min.X, max.X),\n+\t\t\t\tMathHelper.Clamp(value1.Y, min.Y, max.Y)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static void Clamp(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 min,\n+\t\t\tref Vector2 max,\n+\t\t\tout Vector2 result\n+\t\t) {\n+\t\t\tresult = new Vector2(\n+\t\t\t\tMathHelper.Clamp(value1.X, min.X, max.X),\n+\t\t\t\tMathHelper.Clamp(value1.Y, min.Y, max.Y)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static float Distance(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\tfloat v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n+\t\t\treturn (float) Math.Sqrt((v1 * v1) + (v2 * v2));\n+\t\t}\n+\n+\t\tpublic static void Distance(ref Vector2 value1, ref Vector2 value2, out float result)\n+\t\t{\n+\t\t\tfloat v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n+\t\t\tresult = (float) Math.Sqrt((v1 * v1) + (v2 * v2));\n+\t\t}\n+\n+\t\tpublic static float DistanceSquared(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\tfloat v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n+\t\t\treturn (v1 * v1) + (v2 * v2);\n+\t\t}\n+\n+\t\tpublic static void DistanceSquared(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 value2,\n+\t\t\tout float result\n+\t\t) {\n+\t\t\tfloat v1 = value1.X - value2.X, v2 = value1.Y - value2.Y;\n+\t\t\tresult = (v1 * v1) + (v2 * v2);\n+\t\t}\n+\n+\t\tpublic static Vector2 Divide(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\tvalue1.X /= value2.X;\n+\t\t\tvalue1.Y /= value2.Y;\n+\t\t\treturn value1;\n+\t\t}\n+\n+\t\tpublic static void Divide(ref Vector2 value1, ref Vector2 value2, out Vector2 result)\n+\t\t{\n+\t\t\tresult.X = value1.X / value2.X;\n+\t\t\tresult.Y = value1.Y / value2.Y;\n+\t\t}\n+\n+\t\tpublic static Vector2 Divide(Vector2 value1, float divider)\n+\t\t{\n+\t\t\tfloat factor = 1 / divider;\n+\t\t\tvalue1.X *= factor;\n+\t\t\tvalue1.Y *= factor;\n+\t\t\treturn value1;\n+\t\t}\n+\n+\t\tpublic static void Divide(ref Vector2 value1, float divider, out Vector2 result)\n+\t\t{\n+\t\t\tfloat factor = 1 / divider;\n+\t\t\tresult.X = value1.X * factor;\n+\t\t\tresult.Y = value1.Y * factor;\n+\t\t}\n+\n+\t\tpublic static float Dot(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\treturn (value1.X * value2.X) + (value1.Y * value2.Y);\n+\t\t}\n+\n+\t\tpublic static void Dot(ref Vector2 value1, ref Vector2 value2, out float result)\n+\t\t{\n+\t\t\tresult = (value1.X * value2.X) + (value1.Y * value2.Y);\n+\t\t}\n+\n+\t\tpublic static Vector2 Reflect(Vector2 vector, Vector2 normal)\n+\t\t{\n+\t\t\tVector2 result;\n+\t\t\tfloat val = 2.0f * ((vector.X * normal.X) + (vector.Y * normal.Y));\n+\t\t\tresult.X = vector.X - (normal.X * val);\n+\t\t\tresult.Y = vector.Y - (normal.Y * val);\n+\t\t\treturn result;\n+\t\t}\n+\n+\t\tpublic static void Reflect(ref Vector2 vector, ref Vector2 normal, out Vector2 result)\n+\t\t{\n+\t\t\tfloat val = 2.0f * ((vector.X * normal.X) + (vector.Y * normal.Y));\n+\t\t\tresult.X = vector.X - (normal.X * val);\n+\t\t\tresult.Y = vector.Y - (normal.Y * val);\n+\t\t}\n+\n+\t\tpublic static Vector2 Hermite(\n+\t\t\tVector2 value1,\n+\t\t\tVector2 tangent1,\n+\t\t\tVector2 value2,\n+\t\t\tVector2 tangent2,\n+\t\t\tfloat amount\n+\t\t) {\n+\t\t\tVector2 result = new Vector2();\n+\t\t\tHermite(ref value1, ref tangent1, ref value2, ref tangent2, amount, out result);\n+\t\t\treturn result;\n+\t\t}\n+\n+\t\tpublic static void Hermite(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 tangent1,\n+\t\t\tref Vector2 value2,\n+\t\t\tref Vector2 tangent2,\n+\t\t\tfloat amount,\n+\t\t\tout Vector2 result\n+\t\t) {\n+\t\t\tresult.X = MathHelper.Hermite(value1.X, tangent1.X, value2.X, tangent2.X, amount);\n+\t\t\tresult.Y = MathHelper.Hermite(value1.Y, tangent1.Y, value2.Y, tangent2.Y, amount);\n+\t\t}\n+\n+\t\tpublic static Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)\n+\t\t{\n+\t\t\treturn new Vector2(\n+\t\t\t\tMathHelper.Lerp(value1.X, value2.X, amount),\n+\t\t\t\tMathHelper.Lerp(value1.Y, value2.Y, amount)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static void Lerp(\n+\t\t\tref Vector2 value1,\n+\t\t\tref Vector2 value2,\n+\t\t\tfloat amount,\n+\t\t\tout Vector2 result\n+\t\t) {\n+\t\t\tresult = new Vector2(\n+\t\t\t\tMathHelper.Lerp(value1.X, value2.X, amount),\n+\t\t\t\tMathHelper.Lerp(value1.Y, value2.Y, amount)\n+\t\t\t);\n+\t\t}\n+\n+\t\tpublic static Vector2 Max(Vector2 value1, Vector2 value2)\n+\t\t{\n+\t\t\treturn new Vector2(value1.X > value2.X ? value1.X : value2.X,","path":"MonoGame.Framework/Vector2.cs","position":888,"original_position":888,"commit_id":"b6b3c7feb565e64cafee7c79691a5efe8a9a4869","original_commit_id":"b6b3c7feb565e64cafee7c79691a5efe8a9a4869","user":{"login":"flibitijibibo","id":1396814,"avatar_url":"https://avatars.githubusercontent.com/u/1396814?","gravatar_id":"f72913968167f06b4c9e2c765eb60afe","url":"https://api.github.com/users/flibitijibibo","html_url":"https://github.com/flibitijibibo","followers_url":"https://api.github.com/users/flibitijibibo/followers","following_url":"https://api.github.com/users/flibitijibibo/following{/other_user}","gists_url":"https://api.github.com/users/flibitijibibo/gists{/gist_id}","starred_url":"https://api.github.com/users/flibitijibibo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibitijibibo/subscriptions","organizations_url":"https://api.github.com/users/flibitijibibo/orgs","repos_url":"https://api.github.com/users/flibitijibibo/repos","events_url":"https://api.github.com/users/flibitijibibo/events{/privacy}","received_events_url":"https://api.github.com/users/flibitijibibo/received_events","type":"User","site_admin":false},"body":"Split these up as you've done in others. Seems to be the same case for Min as well.","created_at":"2014-04-01T01:45:45Z","updated_at":"2014-04-01T01:45:45Z","html_url":"https://github.com/flibitijibibo/MonoGame/pull/184#discussion_r11145057","pull_request_url":"https://api.github.com/repos/flibitijibibo/MonoGame/pulls/184","_links":{"self":{"href":"https://api.github.com/repos/flibitijibibo/MonoGame/pulls/comments/11145057"},"html":{"href":"https://github.com/flibitijibibo/MonoGame/pull/184#discussion_r11145057"},"pull_request":{"href":"https://api.github.com/repos/flibitijibibo/MonoGame/pulls/184"}}}}