#pragma warning disable CS0660, CS0661
namespace ComputeSharp;
///
/// A that maps the HLSL type.
///
public partial struct Bool4
{
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first vector component.
/// The value to assign to the second vector component.
/// The value to assign to the third vector component.
/// The value to assign to the fourth vector component.
public Bool4(bool x, bool y, bool z, bool w)
{
this.x = x ? 1 : 0;
this.y = y ? 1 : 0;
this.z = z ? 1 : 0;
this.w = w ? 1 : 0;
}
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first and second vector components.
/// The value to assign to the third vector component.
/// The value to assign to the fourth vector component.
public Bool4(Bool2 xy, bool z, bool w)
{
this.x = xy.X ? 1 : 0;
this.y = xy.Y ? 1 : 0;
this.z = z ? 1 : 0;
this.w = w ? 1 : 0;
}
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first vector component.
/// The value to assign to the second vector component.
/// The value to assign to the third and fourth vector components.
public Bool4(bool x, bool y, Bool2 zw)
{
this.x = x ? 1 : 0;
this.y = y ? 1 : 0;
this.z = zw.X ? 1 : 0;
this.w = zw.Y ? 1 : 0;
}
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first and second vector components.
/// The value to assign to the third and fourth vector components.
public Bool4(Bool2 xy, Bool2 zw)
{
this.x = xy.X ? 1 : 0;
this.y = xy.Y ? 1 : 0;
this.z = zw.X ? 1 : 0;
this.w = zw.Y ? 1 : 0;
}
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first, second and third vector components.
/// The value to assign to the fourth vector component.
public Bool4(Bool3 xyz, bool w)
{
this.x = xyz.X ? 1 : 0;
this.y = xyz.Y ? 1 : 0;
this.z = xyz.Z ? 1 : 0;
this.w = w ? 1 : 0;
}
///
/// Creates a new instance with the specified parameters.
///
/// The value to assign to the first vector component.
/// The value to assign to the second, third and fourth vector components.
public Bool4(bool x, Bool3 yzw)
{
this.x = x ? 1 : 0;
this.y = yzw.X ? 1 : 0;
this.z = yzw.Y ? 1 : 0;
this.w = yzw.Z ? 1 : 0;
}
///
/// Creates a new value with the same value for all its components.
///
/// The value to use for the components of the new instance.
public static implicit operator Bool4(bool x) => new(x, x, x, x);
}