mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
80 lines
1.7 KiB
C#
80 lines
1.7 KiB
C#
// <auto-generated /> - edit Vector.swizzle.tt to modify
|
|
#nullable enable
|
|
|
|
namespace Brutal.Numerics;
|
|
|
|
public partial struct double2
|
|
{
|
|
/// <summary>
|
|
/// Swizzle readonly getter/setter for the X and Y components of the vector.
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double2 XY
|
|
{
|
|
readonly get => this;
|
|
set => this = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Swizzle readonly getter/setter for the Y and X components of the vector.
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double2 YX
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
readonly get => new(Y, X);
|
|
set
|
|
{
|
|
Y = value.X;
|
|
X = value.Y;
|
|
}
|
|
}
|
|
}
|
|
|
|
public partial struct double2
|
|
{
|
|
/// <summary>
|
|
/// The Red component of the vector (synonym for X).
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double R
|
|
{
|
|
readonly get => X;
|
|
set => X = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The Green component of the vector (synonym for Y).
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double G
|
|
{
|
|
readonly get => Y;
|
|
set => Y = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Swizzle readonly getter/setter for the Red and Green components of the vector.
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double2 RG
|
|
{
|
|
readonly get => this;
|
|
set => this = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Swizzle readonly getter/setter for the Green and Red components of the vector.
|
|
/// </summary>
|
|
[XmlIgnore]
|
|
public double2 GR
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
readonly get => new(Y, X);
|
|
set
|
|
{
|
|
G = value.R;
|
|
R = value.G;
|
|
}
|
|
}
|
|
}
|