mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 15:55:31 +00:00
Added vector overloads to Multiply and Divide methods.
Renamed Sub to Subtract, Mult to Multiply and Div to Divide (reason: conform with the class library design guidelines). Obsoleted instance Add, Sub, Mult and Div methods in favor of static ones (reason: reduce API bloat, they are completely redudant). Improved documentation for new methods.
This commit is contained in:
parent
21bde35e61
commit
201b06931e
|
@ -104,6 +104,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector2 right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -113,6 +114,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -125,6 +127,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector2 right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -134,6 +137,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -144,9 +148,9 @@ namespace OpenTK
|
|||
|
||||
#region public void Mult()
|
||||
|
||||
[Obsolete]
|
||||
/// <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;
|
||||
|
@ -159,6 +163,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -350,34 +355,7 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add the specified instances
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector2 Add(Vector2 a, Vector2 b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(ref Vector2 a, ref Vector2 b, out Vector2 result)
|
||||
{
|
||||
result.X = a.X + b.X;
|
||||
result.Y = a.Y + b.Y;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -387,6 +365,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -400,6 +379,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -416,6 +396,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -429,6 +410,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -445,6 +427,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -459,6 +442,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -468,6 +452,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector2 Add(Vector2 a, Vector2 b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector2 a, ref Vector2 b, out Vector2 result)
|
||||
{
|
||||
result = new Vector2(a.X + b.X, a.Y + b.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Vector2 Subtract(Vector2 a, Vector2 b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector2 a, ref Vector2 b, out Vector2 result)
|
||||
{
|
||||
result = new Vector2(a.X - b.X, a.Y - b.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2 Multiply(Vector2 vector, float scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector2 vector, float scale, out Vector2 result)
|
||||
{
|
||||
result = new Vector2(vector.X * scale, vector.Y * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2 Multiply(Vector2 vector, Vector2 scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector2 vector, ref Vector2 scale, out Vector2 result)
|
||||
{
|
||||
result = new Vector2(vector.X * scale.X, vector.Y * scale.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2 Divide(Vector2 vector, float scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector2 vector, float scale, out Vector2 result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2 Divide(Vector2 vector, Vector2 scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector2 vector, ref Vector2 scale, out Vector2 result)
|
||||
{
|
||||
result = new Vector2(vector.X / scale.X, vector.Y / scale.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ComponentMin
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -88,6 +88,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector2d right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -97,6 +98,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -109,6 +111,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector2d right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -118,6 +121,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -130,6 +134,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -142,6 +147,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -267,34 +273,7 @@ namespace OpenTK
|
|||
|
||||
#region Static
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector2d Add(Vector2d a, Vector2d b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(ref Vector2d a, ref Vector2d b, out Vector2d result)
|
||||
{
|
||||
result.X = a.X + b.X;
|
||||
result.Y = a.Y + b.Y;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -304,6 +283,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -317,6 +297,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -333,6 +314,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -346,6 +328,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -362,6 +345,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -376,6 +360,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -385,6 +370,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector2d Add(Vector2d a, Vector2d b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector2d a, ref Vector2d b, out Vector2d result)
|
||||
{
|
||||
result = new Vector2d(a.X + b.X, a.Y + b.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Vector2d Subtract(Vector2d a, Vector2d b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector2d a, ref Vector2d b, out Vector2d result)
|
||||
{
|
||||
result = new Vector2d(a.X - b.X, a.Y - b.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2d Multiply(Vector2d vector, double scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector2d vector, double scale, out Vector2d result)
|
||||
{
|
||||
result = new Vector2d(vector.X * scale, vector.Y * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2d Multiply(Vector2d vector, Vector2d scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector2d vector, ref Vector2d scale, out Vector2d result)
|
||||
{
|
||||
result = new Vector2d(vector.X * scale.X, vector.Y * scale.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2d Divide(Vector2d vector, double scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector2d vector, double scale, out Vector2d result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector2d Divide(Vector2d vector, Vector2d scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector2d vector, ref Vector2d scale, out Vector2d result)
|
||||
{
|
||||
result = new Vector2d(vector.X / scale.X, vector.Y / scale.Y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Min
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -114,6 +114,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector3 right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -124,6 +125,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -137,6 +139,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector3 right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -147,6 +150,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -160,6 +164,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -173,6 +178,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -346,36 +352,7 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector3 Add(Vector3 a, Vector3 b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
a.Z += b.Z;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(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 Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -385,6 +362,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -399,6 +377,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -416,6 +395,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -430,6 +410,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -447,6 +428,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -462,6 +444,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -472,6 +455,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector3 Add(Vector3 a, Vector3 b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector3 a, ref Vector3 b, out Vector3 result)
|
||||
{
|
||||
result = new Vector3(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Vector3 Subtract(Vector3 a, Vector3 b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector3 a, ref Vector3 b, out Vector3 result)
|
||||
{
|
||||
result = new Vector3(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3 Multiply(Vector3 vector, float scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector3 vector, float scale, out Vector3 result)
|
||||
{
|
||||
result = new Vector3(vector.X * scale, vector.Y * scale, vector.Z * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3 Multiply(Vector3 vector, Vector3 scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector3 vector, ref Vector3 scale, out Vector3 result)
|
||||
{
|
||||
result = new Vector3(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3 Divide(Vector3 vector, float scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector3 vector, float scale, out Vector3 result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3 Divide(Vector3 vector, Vector3 scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector3 vector, ref Vector3 scale, out Vector3 result)
|
||||
{
|
||||
result = new Vector3(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ComponentMin
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -113,6 +113,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector3d right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -123,6 +124,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -136,6 +138,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector3d right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -146,6 +149,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -159,6 +163,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -172,6 +177,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -345,36 +351,7 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector3d Add(Vector3d a, Vector3d b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
a.Z += b.Z;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(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 Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -384,6 +361,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -398,6 +376,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -415,6 +394,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -429,6 +409,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -446,6 +427,7 @@ namespace OpenTK
|
|||
/// <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.0f / f;
|
||||
|
@ -461,6 +443,7 @@ namespace OpenTK
|
|||
/// <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.0f / f;
|
||||
|
@ -471,6 +454,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector3d Add(Vector3d a, Vector3d b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector3d a, ref Vector3d b, out Vector3d result)
|
||||
{
|
||||
result = new Vector3d(a.X + b.X, a.Y + b.Y, a.Z + b.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Vector3d Subtract(Vector3d a, Vector3d b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector3d a, ref Vector3d b, out Vector3d result)
|
||||
{
|
||||
result = new Vector3d(a.X - b.X, a.Y - b.Y, a.Z - b.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3d Multiply(Vector3d vector, double scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector3d vector, double scale, out Vector3d result)
|
||||
{
|
||||
result = new Vector3d(vector.X * scale, vector.Y * scale, vector.Z * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3d Multiply(Vector3d vector, Vector3d scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector3d vector, ref Vector3d scale, out Vector3d result)
|
||||
{
|
||||
result = new Vector3d(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3d Divide(Vector3d vector, double scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector3d vector, double scale, out Vector3d result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector3d Divide(Vector3d vector, Vector3d scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector3d vector, ref Vector3d scale, out Vector3d result)
|
||||
{
|
||||
result = new Vector3d(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ComponentMin
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -170,6 +170,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector4 right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -181,6 +182,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -195,6 +197,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector4 right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -206,6 +209,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -220,6 +224,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -234,6 +239,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -380,38 +386,7 @@ namespace OpenTK
|
|||
|
||||
#region Static
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector4 Add(Vector4 a, Vector4 b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
a.Z += b.Z;
|
||||
a.W += b.W;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(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 Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -514,6 +489,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector4 Add(Vector4 a, Vector4 b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector4 a, ref Vector4 b, out Vector4 result)
|
||||
{
|
||||
result = new Vector4(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Subtract(Vector4 a, Vector4 b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector4 a, ref Vector4 b, out Vector4 result)
|
||||
{
|
||||
result = new Vector4(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4 Multiply(Vector4 vector, float scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector4 vector, float scale, out Vector4 result)
|
||||
{
|
||||
result = new Vector4(vector.X * scale, vector.Y * scale, vector.Z * scale, vector.W * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4 Multiply(Vector4 vector, Vector4 scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector4 vector, ref Vector4 scale, out Vector4 result)
|
||||
{
|
||||
result = new Vector4(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z, vector.W * scale.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4 Divide(Vector4 vector, float scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector4 vector, float scale, out Vector4 result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4 Divide(Vector4 vector, Vector4 scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector4 vector, ref Vector4 scale, out Vector4 result)
|
||||
{
|
||||
result = new Vector4(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z, vector.W / scale.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Min
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -168,6 +168,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Add the Vector passed as parameter to this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Add() method instead.")]
|
||||
public void Add(Vector4d right)
|
||||
{
|
||||
this.X += right.X;
|
||||
|
@ -179,6 +180,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -193,6 +195,7 @@ namespace OpenTK
|
|||
|
||||
/// <summary>Subtract the Vector passed as parameter from this instance.</summary>
|
||||
/// <param name="right">Right operand. This parameter is only read from.</param>
|
||||
[Obsolete("Use static Subtract() method instead.")]
|
||||
public void Sub(Vector4d right)
|
||||
{
|
||||
this.X -= right.X;
|
||||
|
@ -204,6 +207,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -218,6 +222,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -232,6 +237,7 @@ namespace OpenTK
|
|||
|
||||
/// <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;
|
||||
|
@ -377,38 +383,7 @@ namespace OpenTK
|
|||
|
||||
#region Static
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <returns>Result of addition</returns>
|
||||
public static Vector4d Add(Vector4d a, Vector4d b)
|
||||
{
|
||||
a.X += b.X;
|
||||
a.Y += b.Y;
|
||||
a.Z += b.Z;
|
||||
a.W += b.W;
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add two Vectors
|
||||
/// </summary>
|
||||
/// <param name="a">First operand</param>
|
||||
/// <param name="b">Second operand</param>
|
||||
/// <param name="result">Result of addition</param>
|
||||
public static void Add(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 Obsolete
|
||||
|
||||
#region Sub
|
||||
|
||||
|
@ -418,6 +393,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -433,6 +409,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -451,6 +428,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -466,6 +444,7 @@ namespace OpenTK
|
|||
/// <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;
|
||||
|
@ -484,6 +463,7 @@ namespace OpenTK
|
|||
/// <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.0f / f;
|
||||
|
@ -500,6 +480,7 @@ namespace OpenTK
|
|||
/// <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.0f / f;
|
||||
|
@ -511,6 +492,162 @@ namespace OpenTK
|
|||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <returns>Result of operation.</returns>
|
||||
public static Vector4d Add(Vector4d a, Vector4d b)
|
||||
{
|
||||
Add(ref a, ref b, out a);
|
||||
return a;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds two vectors.
|
||||
/// </summary>
|
||||
/// <param name="a">Left operand.</param>
|
||||
/// <param name="b">Right operand.</param>
|
||||
/// <param name="result">Result of operation.</param>
|
||||
public static void Add(ref Vector4d a, ref Vector4d b, out Vector4d result)
|
||||
{
|
||||
result = new Vector4d(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Subtract
|
||||
|
||||
/// <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 Vector4d Subtract(Vector4d a, Vector4d b)
|
||||
{
|
||||
Subtract(ref a, ref b, out a);
|
||||
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 Subtract(ref Vector4d a, ref Vector4d b, out Vector4d result)
|
||||
{
|
||||
result = new Vector4d(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Multiply
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4d Multiply(Vector4d vector, double scale)
|
||||
{
|
||||
Multiply(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector4d vector, double scale, out Vector4d result)
|
||||
{
|
||||
result = new Vector4d(vector.X * scale, vector.Y * scale, vector.Z * scale, vector.W * scale);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4d Multiply(Vector4d vector, Vector4d scale)
|
||||
{
|
||||
Multiply(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Multiplies a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Multiply(ref Vector4d vector, ref Vector4d scale, out Vector4d result)
|
||||
{
|
||||
result = new Vector4d(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z, vector.W * scale.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Divide
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4d Divide(Vector4d vector, double scale)
|
||||
{
|
||||
Divide(ref vector, scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by a scalar.
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector4d vector, double scale, out Vector4d result)
|
||||
{
|
||||
Multiply(ref vector, 1 / scale, out result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divides a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <returns>Result of the operation.</returns>
|
||||
public static Vector4d Divide(Vector4d vector, Vector4d scale)
|
||||
{
|
||||
Divide(ref vector, ref scale, out vector);
|
||||
return vector;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Divide a vector by the components of a vector (scale).
|
||||
/// </summary>
|
||||
/// <param name="vector">Left operand.</param>
|
||||
/// <param name="scale">Right operand.</param>
|
||||
/// <param name="result">Result of the operation.</param>
|
||||
public static void Divide(ref Vector4d vector, ref Vector4d scale, out Vector4d result)
|
||||
{
|
||||
result = new Vector4d(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z, vector.W / scale.W);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Min
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue