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

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