mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 19:55:33 +00:00
Added Xy and Xyz swizzle operators.
This commit is contained in:
parent
db690b144f
commit
e187ed5a18
|
@ -1004,6 +1004,15 @@ namespace OpenTK.Math
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Swizzle
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector2 with the X and Y components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector2 Xy { get { return new Vector2(X, Y); } set { X = value.X; Y = value.Y; } }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Operators
|
#region Operators
|
||||||
|
|
||||||
public static Vector3 operator +(Vector3 left, Vector3 right)
|
public static Vector3 operator +(Vector3 left, Vector3 right)
|
||||||
|
|
Binary file not shown.
|
@ -189,6 +189,15 @@ namespace OpenTK.Math
|
||||||
|
|
||||||
#endregion Constructors
|
#endregion Constructors
|
||||||
|
|
||||||
|
#region Swizzle
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector2h with the X and Y components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector2h Xy { get { return new Vector2h(X, Y); } set { X = value.X; Y = value.Y; } }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Half -> Single
|
#region Half -> Single
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -827,8 +827,14 @@ namespace OpenTK.Math
|
||||||
|
|
||||||
#region Swizzle
|
#region Swizzle
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector2 with the X and Y components of this instance.
|
||||||
|
/// </summary>
|
||||||
public Vector2 Xy { get { return new Vector2(X, Y); } set { X = value.X; Y = value.Y; } }
|
public Vector2 Xy { get { return new Vector2(X, Y); } set { X = value.X; Y = value.Y; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector3 with the X, Y and Z components of this instance.
|
||||||
|
/// </summary>
|
||||||
public Vector3 Xyz { get { return new Vector3(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } }
|
public Vector3 Xyz { get { return new Vector3(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -822,6 +822,20 @@ namespace OpenTK.Math
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Swizzle
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector2d with the X and Y components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector2d Xy { get { return new Vector2d(X, Y); } set { X = value.X; Y = value.Y; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector3d with the X, Y and Z components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector3d Xyz { get { return new Vector3d(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Operators
|
#region Operators
|
||||||
|
|
||||||
public static Vector4d operator +(Vector4d left, Vector4d right)
|
public static Vector4d operator +(Vector4d left, Vector4d right)
|
||||||
|
|
|
@ -206,6 +206,20 @@ namespace OpenTK.Math
|
||||||
|
|
||||||
#endregion Constructors
|
#endregion Constructors
|
||||||
|
|
||||||
|
#region Swizzle
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector2h with the X and Y components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector2h Xy { get { return new Vector2h(X, Y); } set { X = value.X; Y = value.Y; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets an OpenTK.Math.Vector3h with the X, Y and Z components of this instance.
|
||||||
|
/// </summary>
|
||||||
|
public Vector3h Xyz { get { return new Vector3h(X, Y, Z); } set { X = value.X; Y = value.Y; Z = value.Z; } }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Half -> Single
|
#region Half -> Single
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue