public void Rgb48_ToScaledVector4() { // arrange var short2 = new Rgb48(Vector3.One); // act Vector4 actual = short2.ToScaledVector4(); // assert Assert.Equal(1, actual.X); Assert.Equal(1, actual.Y); Assert.Equal(1, actual.Z); Assert.Equal(1, actual.W); }
public void Rgb48_FromScaledVector4() { // arrange var pixel = default(Rgb48); var short3 = new Rgb48(ushort.MaxValue, ushort.MaxValue, ushort.MaxValue); var expected = new Rgb48(ushort.MaxValue, ushort.MaxValue, ushort.MaxValue); // act Vector4 scaled = short3.ToScaledVector4(); pixel.FromScaledVector4(scaled); // assert Assert.Equal(expected, pixel); }
public void Rgb48_PackFromScaledVector4() { // arrange var pixel = default(Rgb48); var short3 = new Rgb48(Vector3.One); var expected = new Rgb48(Vector3.One); // act Vector4 scaled = short3.ToScaledVector4(); pixel.PackFromScaledVector4(scaled); // assert Assert.Equal(expected, pixel); }
public void FromRgb48(Rgb48 source) => this.FromScaledVector4(source.ToScaledVector4());