Removed obsolete methods from vector classes.

This commit is contained in:
Jarl Gullberg 2017-06-20 15:16:47 +02:00
parent b26bc3f158
commit 0f3de7e1bc
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23
6 changed files with 0 additions and 1352 deletions

View file

@ -94,81 +94,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector2 right)
{
this.X += right.X;
this.Y += right.Y;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector2 right)
{
this.X -= right.X;
this.Y -= right.Y;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -296,42 +221,6 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector2 by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
[Obsolete("Use static Multiply() method instead.")]
public void Scale(float sx, float sy)
{
this.X = X * sx;
this.Y = Y * sy;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector2 scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
[Obsolete("Use static Subtract() method instead.")]
public static Vector2 Sub(Vector2 a, Vector2 b)
{
a.X -= b.X;
a.Y -= b.Y;
return a;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
[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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
[Obsolete("Use static Multiply() method instead.")]
public static Vector2 Mult(Vector2 a, float f)
{
a.X *= f;
a.Y *= f;
return a;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
[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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the division</returns>
[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;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the division</param>
[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
/// <summary>

View file

@ -110,81 +110,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Add() method instead.")]
public void Add(Vector2d right)
{
this.X += right.X;
this.Y += right.Y;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[CLSCompliant(false)]
[Obsolete("Use static Subtract() method instead.")]
public void Sub(Vector2d right)
{
this.X -= right.X;
this.Y -= right.Y;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -276,145 +201,6 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector2 by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
[Obsolete("Use static Multiply() method instead.")]
public void Scale(double sx, double sy)
{
X *= sx;
Y *= sy;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[CLSCompliant(false)]
[Obsolete("Use static Multiply() method instead.")]
public void Scale(Vector2d scale)
{
this.X *= scale.X;
this.Y *= scale.Y;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
[Obsolete("Use static Subtract() method instead.")]
public static Vector2d Sub(Vector2d a, Vector2d b)
{
a.X -= b.X;
a.Y -= b.Y;
return a;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
[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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="d">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
[Obsolete("Use static Multiply() method instead.")]
public static Vector2d Mult(Vector2d a, double d)
{
a.X *= d;
a.Y *= d;
return a;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="d">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
[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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="d">Scalar operand</param>
/// <returns>Result of the division</returns>
[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;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="d">Scalar operand</param>
/// <param name="result">Result of the division</param>
[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
/// <summary>

View file

@ -140,87 +140,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -320,46 +239,6 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector3 by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
/// <param name="sz">The scale of the Z component.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
[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;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
[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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
[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;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
[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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the division</returns>
[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;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the division</param>
[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
/// <summary>

View file

@ -137,87 +137,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -318,46 +237,6 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector3d by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
/// <param name="sz">The scale of the Z component.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
[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;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
[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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
[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;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
[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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the division</returns>
[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;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the division</param>
[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
/// <summary>

View file

@ -200,93 +200,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -388,157 +301,10 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector4 by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
/// <param name="sz">The scale of the Z component.</param>
/// <param name="sw">The scale of the Z component.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
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;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
public static Vector4 Mult(Vector4 a, float f)
{
a.X *= f;
a.Y *= f;
a.Z *= f;
a.W *= f;
return a;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the division</returns>
public static Vector4 Div(Vector4 a, float f)
{
a.X /= f;
a.Y /= f;
a.Z /= f;
a.W /= f;
return a;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the division</param>
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
/// <summary>

View file

@ -197,93 +197,6 @@ namespace OpenTK
#region Instance
#region public void Add()
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Add the Vector passed as parameter to this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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;
}
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
/// <param name="right">Right operand. This parameter is only read from.</param>
[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()
/// <summary>Multiply this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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()
/// <summary>Divide this instance by a scalar.</summary>
/// <param name="f">Scalar operand.</param>
[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
/// <summary>
@ -384,165 +297,10 @@ namespace OpenTK
#endregion
#region public void Scale()
/// <summary>
/// Scales the current Vector4d by the given amounts.
/// </summary>
/// <param name="sx">The scale of the X component.</param>
/// <param name="sy">The scale of the Y component.</param>
/// <param name="sz">The scale of the Z component.</param>
/// <param name="sw">The scale of the Z component.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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;
}
/// <summary>Scales this instance by the given parameter.</summary>
/// <param name="scale">The scaling of the individual components.</param>
[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
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <returns>Result of subtraction</returns>
[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;
}
/// <summary>
/// Subtract one Vector from another
/// </summary>
/// <param name="a">First operand</param>
/// <param name="b">Second operand</param>
/// <param name="result">Result of subtraction</param>
[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
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the multiplication</returns>
[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;
}
/// <summary>
/// Multiply a vector and a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the multiplication</param>
[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
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <returns>Result of the division</returns>
[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;
}
/// <summary>
/// Divide a vector by a scalar
/// </summary>
/// <param name="a">Vector operand</param>
/// <param name="f">Scalar operand</param>
/// <param name="result">Result of the division</param>
[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
/// <summary>