public void La16_FromVector4(byte luminance) { // Arrange La16 gray = default; var vector = new La16(luminance, luminance).ToVector4(); // Act gray.FromVector4(vector); byte actualL = gray.L; byte actualA = gray.A; // Assert Assert.Equal(luminance, actualL); Assert.Equal(luminance, actualA); }
public void FromVector4_IsRgba32Compatible(byte luminance) { var original = new La16(luminance, luminance); Rgba32 rgba = default; original.ToRgba32(ref rgba); var rgbaVector = original.ToVector4(); La16 mirror = default; mirror.FromVector4(rgbaVector); Assert.Equal(original, mirror); }