public void L8_FromScaledVector4() { // Arrange L8 gray = default; const byte expected = 128; Vector4 scaled = new L8(expected).ToScaledVector4(); // Act gray.FromScaledVector4(scaled); byte actual = gray.PackedValue; // Assert Assert.Equal(expected, actual); }
public void FromScaledVector4_IsRgba32Compatible(byte luminance) { var original = new L8(luminance); Rgba32 rgba = default; original.ToRgba32(ref rgba); Vector4 rgbaVector = original.ToScaledVector4(); L8 mirror = default; mirror.FromScaledVector4(rgbaVector); Assert.Equal(original, mirror); }