diff --git a/src/OpenTK/Math/Vector2.cs b/src/OpenTK/Math/Vector2.cs index d2d5b66c..dcf58f79 100644 --- a/src/OpenTK/Math/Vector2.cs +++ b/src/OpenTK/Math/Vector2.cs @@ -94,81 +94,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector2 right) - { - this.X += right.X; - this.Y += right.Y; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector2 right) - { - this.X += right.X; - this.Y += right.Y; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector2 right) - { - this.X -= right.X; - this.Y -= right.Y; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector2 right) - { - this.X -= right.X; - this.Y -= right.Y; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(float f) - { - this.X *= f; - this.Y *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(float f) - { - float mult = 1.0f / f; - this.X *= mult; - this.Y *= mult; - } - - #endregion public void Div() - #region public float Length /// @@ -296,42 +221,6 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector2 by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(float sx, float sy) - { - this.X = X * sx; - this.Y = Y * sy; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(Vector2 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(ref Vector2 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - } - - #endregion public void Scale() - #endregion #region Static @@ -365,105 +254,6 @@ namespace OpenTK #endregion - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static Vector2 Sub(Vector2 a, Vector2 b) - { - a.X -= b.X; - a.Y -= b.Y; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static void Sub(ref Vector2 a, ref Vector2 b, out Vector2 result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static Vector2 Mult(Vector2 a, float f) - { - a.X *= f; - a.Y *= f; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static void Mult(ref Vector2 a, float f, out Vector2 result) - { - result.X = a.X * f; - result.Y = a.Y * f; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static Vector2 Div(Vector2 a, float f) - { - float mult = 1.0f / f; - a.X *= mult; - a.Y *= mult; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static void Div(ref Vector2 a, float f, out Vector2 result) - { - float mult = 1.0f / f; - result.X = a.X * mult; - result.Y = a.Y * mult; - } - - #endregion - - #endregion - #region Add /// diff --git a/src/OpenTK/Math/Vector2d.cs b/src/OpenTK/Math/Vector2d.cs index 712b4714..bc45b8bf 100644 --- a/src/OpenTK/Math/Vector2d.cs +++ b/src/OpenTK/Math/Vector2d.cs @@ -110,81 +110,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector2d right) - { - this.X += right.X; - this.Y += right.Y; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector2d right) - { - this.X += right.X; - this.Y += right.Y; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector2d right) - { - this.X -= right.X; - this.Y -= right.Y; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector2d right) - { - this.X -= right.X; - this.Y -= right.Y; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(double f) - { - this.X *= f; - this.Y *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(double f) - { - double mult = 1.0 / f; - this.X *= mult; - this.Y *= mult; - } - - #endregion public void Div() - #region public double Length /// @@ -276,145 +201,6 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector2 by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(double sx, double sy) - { - X *= sx; - Y *= sy; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(Vector2d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(ref Vector2d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - } - - #endregion public void Scale() - - #endregion - - #region Static - - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static Vector2d Sub(Vector2d a, Vector2d b) - { - a.X -= b.X; - a.Y -= b.Y; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static void Sub(ref Vector2d a, ref Vector2d b, out Vector2d result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static Vector2d Mult(Vector2d a, double d) - { - a.X *= d; - a.Y *= d; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static void Mult(ref Vector2d a, double d, out Vector2d result) - { - result.X = a.X * d; - result.Y = a.Y * d; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static Vector2d Div(Vector2d a, double d) - { - double mult = 1.0 / d; - a.X *= mult; - a.Y *= mult; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static void Div(ref Vector2d a, double d, out Vector2d result) - { - double mult = 1.0 / d; - result.X = a.X * mult; - result.Y = a.Y * mult; - } - - #endregion - - #endregion - #region Add /// diff --git a/src/OpenTK/Math/Vector3.cs b/src/OpenTK/Math/Vector3.cs index 510ae63e..1ac4d7c1 100644 --- a/src/OpenTK/Math/Vector3.cs +++ b/src/OpenTK/Math/Vector3.cs @@ -140,87 +140,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector3 right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector3 right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector3 right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector3 right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(float f) - { - this.X *= f; - this.Y *= f; - this.Z *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(float f) - { - float mult = 1.0f / f; - this.X *= mult; - this.Y *= mult; - this.Z *= mult; - } - - #endregion public void Div() - #region public float Length /// @@ -320,46 +239,6 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector3 by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - /// The scale of the Z component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(float sx, float sy, float sz) - { - this.X = X * sx; - this.Y = Y * sy; - this.Z = Z * sz; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(Vector3 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(ref Vector3 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - } - - #endregion public void Scale() - #endregion #region Static @@ -398,111 +277,6 @@ namespace OpenTK #endregion - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static Vector3 Sub(Vector3 a, Vector3 b) - { - a.X -= b.X; - a.Y -= b.Y; - a.Z -= b.Z; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static void Sub(ref Vector3 a, ref Vector3 b, out Vector3 result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - result.Z = a.Z - b.Z; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static Vector3 Mult(Vector3 a, float f) - { - a.X *= f; - a.Y *= f; - a.Z *= f; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static void Mult(ref Vector3 a, float f, out Vector3 result) - { - result.X = a.X * f; - result.Y = a.Y * f; - result.Z = a.Z * f; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static Vector3 Div(Vector3 a, float f) - { - float mult = 1.0f / f; - a.X *= mult; - a.Y *= mult; - a.Z *= mult; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static void Div(ref Vector3 a, float f, out Vector3 result) - { - float mult = 1.0f / f; - result.X = a.X * mult; - result.Y = a.Y * mult; - result.Z = a.Z * mult; - } - - #endregion - - #endregion - #region Add /// diff --git a/src/OpenTK/Math/Vector3d.cs b/src/OpenTK/Math/Vector3d.cs index aab85e7d..0a57a412 100644 --- a/src/OpenTK/Math/Vector3d.cs +++ b/src/OpenTK/Math/Vector3d.cs @@ -137,87 +137,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector3d right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector3d right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector3d right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector3d right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(double f) - { - this.X *= f; - this.Y *= f; - this.Z *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(double f) - { - double mult = 1.0 / f; - this.X *= mult; - this.Y *= mult; - this.Z *= mult; - } - - #endregion public void Div() - #region public double Length /// @@ -318,46 +237,6 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector3d by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - /// The scale of the Z component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(double sx, double sy, double sz) - { - this.X = X * sx; - this.Y = Y * sy; - this.Z = Z * sz; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [Obsolete("Use static Multiply() method instead.")] - [CLSCompliant(false)] - public void Scale(Vector3d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [Obsolete("Use static Multiply() method instead.")] - [CLSCompliant(false)] - public void Scale(ref Vector3d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - } - - #endregion public void Scale() - #endregion #region Static @@ -396,111 +275,6 @@ namespace OpenTK #endregion - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static Vector3d Sub(Vector3d a, Vector3d b) - { - a.X -= b.X; - a.Y -= b.Y; - a.Z -= b.Z; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static void Sub(ref Vector3d a, ref Vector3d b, out Vector3d result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - result.Z = a.Z - b.Z; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static Vector3d Mult(Vector3d a, double f) - { - a.X *= f; - a.Y *= f; - a.Z *= f; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static void Mult(ref Vector3d a, double f, out Vector3d result) - { - result.X = a.X * f; - result.Y = a.Y * f; - result.Z = a.Z * f; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static Vector3d Div(Vector3d a, double f) - { - double mult = 1.0 / f; - a.X *= mult; - a.Y *= mult; - a.Z *= mult; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static void Div(ref Vector3d a, double f, out Vector3d result) - { - double mult = 1.0 / f; - result.X = a.X * mult; - result.Y = a.Y * mult; - result.Z = a.Z * mult; - } - - #endregion - - #endregion - #region Add /// diff --git a/src/OpenTK/Math/Vector4.cs b/src/OpenTK/Math/Vector4.cs index 42dc6beb..cc16503d 100644 --- a/src/OpenTK/Math/Vector4.cs +++ b/src/OpenTK/Math/Vector4.cs @@ -200,93 +200,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector4 right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - this.W += right.W; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector4 right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - this.W += right.W; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector4 right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - this.W -= right.W; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector4 right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - this.W -= right.W; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(float f) - { - this.X *= f; - this.Y *= f; - this.Z *= f; - this.W *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(float f) - { - float mult = 1.0f / f; - this.X *= mult; - this.Y *= mult; - this.Z *= mult; - this.W *= mult; - } - - #endregion public void Div() - #region public float Length /// @@ -388,157 +301,10 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector4 by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - /// The scale of the Z component. - /// The scale of the Z component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(float sx, float sy, float sz, float sw) - { - this.X = X * sx; - this.Y = Y * sy; - this.Z = Z * sz; - this.W = W * sw; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(Vector4 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - this.W *= scale.W; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(ref Vector4 scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - this.W *= scale.W; - } - - #endregion public void Scale() - #endregion #region Static - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - public static Vector4 Sub(Vector4 a, Vector4 b) - { - a.X -= b.X; - a.Y -= b.Y; - a.Z -= b.Z; - a.W -= b.W; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - public static void Sub(ref Vector4 a, ref Vector4 b, out Vector4 result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - result.Z = a.Z - b.Z; - result.W = a.W - b.W; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - public static Vector4 Mult(Vector4 a, float f) - { - a.X *= f; - a.Y *= f; - a.Z *= f; - a.W *= f; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - public static void Mult(ref Vector4 a, float f, out Vector4 result) - { - result.X = a.X * f; - result.Y = a.Y * f; - result.Z = a.Z * f; - result.W = a.W * f; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - public static Vector4 Div(Vector4 a, float f) - { - a.X /= f; - a.Y /= f; - a.Z /= f; - a.W /= f; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - public static void Div(ref Vector4 a, float f, out Vector4 result) - { - result.X = a.X / f; - result.Y = a.Y / f; - result.Z = a.Z / f; - result.W = a.W / f; - } - - #endregion - - #endregion - #region Add /// diff --git a/src/OpenTK/Math/Vector4d.cs b/src/OpenTK/Math/Vector4d.cs index bed7aa1c..16816141 100644 --- a/src/OpenTK/Math/Vector4d.cs +++ b/src/OpenTK/Math/Vector4d.cs @@ -197,93 +197,6 @@ namespace OpenTK #region Instance - #region public void Add() - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(Vector4d right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - this.W += right.W; - } - - /// Add the Vector passed as parameter to this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Add() method instead.")] - public void Add(ref Vector4d right) - { - this.X += right.X; - this.Y += right.Y; - this.Z += right.Z; - this.W += right.W; - } - - #endregion public void Add() - - #region public void Sub() - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(Vector4d right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - this.W -= right.W; - } - - /// Subtract the Vector passed as parameter from this instance. - /// Right operand. This parameter is only read from. - [CLSCompliant(false)] - [Obsolete("Use static Subtract() method instead.")] - public void Sub(ref Vector4d right) - { - this.X -= right.X; - this.Y -= right.Y; - this.Z -= right.Z; - this.W -= right.W; - } - - #endregion public void Sub() - - #region public void Mult() - - /// Multiply this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Multiply() method instead.")] - public void Mult(double f) - { - this.X *= f; - this.Y *= f; - this.Z *= f; - this.W *= f; - } - - #endregion public void Mult() - - #region public void Div() - - /// Divide this instance by a scalar. - /// Scalar operand. - [Obsolete("Use static Divide() method instead.")] - public void Div(double f) - { - double mult = 1.0 / f; - this.X *= mult; - this.Y *= mult; - this.Z *= mult; - this.W *= mult; - } - - #endregion public void Div() - #region public double Length /// @@ -384,165 +297,10 @@ namespace OpenTK #endregion - #region public void Scale() - - /// - /// Scales the current Vector4d by the given amounts. - /// - /// The scale of the X component. - /// The scale of the Y component. - /// The scale of the Z component. - /// The scale of the Z component. - [Obsolete("Use static Multiply() method instead.")] - public void Scale(double sx, double sy, double sz, double sw) - { - this.X = X * sx; - this.Y = Y * sy; - this.Z = Z * sz; - this.W = W * sw; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(Vector4d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - this.W *= scale.W; - } - - /// Scales this instance by the given parameter. - /// The scaling of the individual components. - [CLSCompliant(false)] - [Obsolete("Use static Multiply() method instead.")] - public void Scale(ref Vector4d scale) - { - this.X *= scale.X; - this.Y *= scale.Y; - this.Z *= scale.Z; - this.W *= scale.W; - } - - #endregion public void Scale() - #endregion #region Static - #region Obsolete - - #region Sub - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static Vector4d Sub(Vector4d a, Vector4d b) - { - a.X -= b.X; - a.Y -= b.Y; - a.Z -= b.Z; - a.W -= b.W; - return a; - } - - /// - /// Subtract one Vector from another - /// - /// First operand - /// Second operand - /// Result of subtraction - [Obsolete("Use static Subtract() method instead.")] - public static void Sub(ref Vector4d a, ref Vector4d b, out Vector4d result) - { - result.X = a.X - b.X; - result.Y = a.Y - b.Y; - result.Z = a.Z - b.Z; - result.W = a.W - b.W; - } - - #endregion - - #region Mult - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static Vector4d Mult(Vector4d a, double f) - { - a.X *= f; - a.Y *= f; - a.Z *= f; - a.W *= f; - return a; - } - - /// - /// Multiply a vector and a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the multiplication - [Obsolete("Use static Multiply() method instead.")] - public static void Mult(ref Vector4d a, double f, out Vector4d result) - { - result.X = a.X * f; - result.Y = a.Y * f; - result.Z = a.Z * f; - result.W = a.W * f; - } - - #endregion - - #region Div - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static Vector4d Div(Vector4d a, double f) - { - double mult = 1.0 / f; - a.X *= mult; - a.Y *= mult; - a.Z *= mult; - a.W *= mult; - return a; - } - - /// - /// Divide a vector by a scalar - /// - /// Vector operand - /// Scalar operand - /// Result of the division - [Obsolete("Use static Divide() method instead.")] - public static void Div(ref Vector4d a, double f, out Vector4d result) - { - double mult = 1.0 / f; - result.X = a.X * mult; - result.Y = a.Y * mult; - result.Z = a.Z * mult; - result.W = a.W * mult; - } - - #endregion - - #endregion - #region Add ///