package speiger.src.coreengine.math.vector.bytes;

public record Vec4bImmutable(byte x, byte y, byte z, byte w) implements Vec4b {
	
	public Vec4bImmutable() {
		this((byte)0, (byte)0, (byte)0, (byte)0);
	}
	
	public Vec4bImmutable(byte value) {
		this(value, value, value, value);
	}
		
	@Override
	public boolean isMutable() { return false; }
	@Override
	public Vec4b x(byte x) { return this.x == x ? this : Vec4b.of(x, y, z, w); }
	@Override
	public Vec4b y(byte y) { return this.y == y ? this : Vec4b.of(x, y, z, w); }
	@Override
	public Vec4b z(byte z) { return this.z == z ? this : Vec4b.of(x, y, z, w); }
	@Override
	public Vec4b w(byte w) { return this.w == w ? this : Vec4b.of(x, y, z, w); }
	@Override
	public Vec4b copy() { return Vec4b.of(this); }
	@Override
	public Vec4b set(byte x, byte y, byte z, byte w) { return this.x == x && this.y == y && this.z == z && this.w == w ? this : Vec4b.of(x, y, z, w); }
}
