// - edit Vector.swizzle.tt to modify
#nullable enable
namespace Brutal.Numerics;
public partial struct byte2
{
///
/// Swizzle readonly getter/setter for the X and Y components of the vector.
///
[XmlIgnore]
public byte2 XY
{
readonly get => this;
set => this = value;
}
///
/// Swizzle readonly getter/setter for the Y and X components of the vector.
///
[XmlIgnore]
public byte2 YX
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, X);
set
{
Y = value.X;
X = value.Y;
}
}
}
public partial struct byte2
{
///
/// The Red component of the vector (synonym for X).
///
[XmlIgnore]
public byte R
{
readonly get => X;
set => X = value;
}
///
/// The Green component of the vector (synonym for Y).
///
[XmlIgnore]
public byte G
{
readonly get => Y;
set => Y = value;
}
///
/// Swizzle readonly getter/setter for the Red and Green components of the vector.
///
[XmlIgnore]
public byte2 RG
{
readonly get => this;
set => this = value;
}
///
/// Swizzle readonly getter/setter for the Green and Red components of the vector.
///
[XmlIgnore]
public byte2 GR
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
readonly get => new(Y, X);
set
{
G = value.R;
R = value.G;
}
}
}