public void ChromaticityCoordinates() { var first = new xyChromaticityCoordinates(1, 0.445); var second = new xyChromaticityCoordinates(1, 0.445); Assert.Equal(first, (object)second); }
public void CCTFromChromaticity(double x, double y, double expectedCCT) { // arrange var chromaticity = new xyChromaticityCoordinates(x, y); var approximation = new CCTConverter(); // action double cct = approximation.GetCCTOfChromaticity(chromaticity); // assert Debug.WriteLine(string.Format("CCT {0} K (difference {1} K)", cct, Math.Abs(expectedCCT - cct))); Assert.That(cct, Is.EqualTo(expectedCCT).Using(new DoubleDeltaComparer(66))); }
public void ChromaticityFromCCT(double expectedX, double expectedY, double cct) { // arrange var approximation = new CCTConverter(); // action xyChromaticityCoordinates chromaticity = approximation.GetChromaticityOfCCT(cct); // assert var deltaComparer = new DoubleDeltaComparer(0.02); Assert.That(chromaticity.x, Is.EqualTo(expectedX).Using(deltaComparer)); Assert.That(chromaticity.y, Is.EqualTo(expectedY).Using(deltaComparer)); }
public void CCTFromChromaticity(double x, double y, double expectedCCT) { // arrange var chromaticity = new xyChromaticityCoordinates(x, y); // action var cct = CCTConverter.GetCCTOfChromaticity(chromaticity); // assert Debug.WriteLine($"CCT {cct} K (difference {Math.Abs(expectedCCT - cct)} K)"); var deltaComparer = new DoubleDeltaComparer(66); Assert.Equal(cct, expectedCCT, deltaComparer); }
public void ChromaticityCoordinates() { var coordinates = new xyChromaticityCoordinates(1, 0.445); Assert.AreEqual("xy [x=1, y=0.45]", coordinates.ToString()); }
public void CCTFromChromaticity(double x, double y, double expectedCCT) { // arrange var chromaticity = new xyChromaticityCoordinates(x, y); var approximation = new CCTConverter(); // action double cct = approximation.GetCCTOfChromaticity(chromaticity); // assert Debug.WriteLine(string.Format("CCT {0} K (difference {1} K)", cct, Math.Abs(expectedCCT - cct))); Assert.That(cct, Is.EqualTo(expectedCCT).Using(new DoubleDeltaComparer(66))); }
/// <summary> /// Constructs coordinates /// </summary> public RGBPrimariesChromaticityCoordinates(xyChromaticityCoordinates r, xyChromaticityCoordinates g, xyChromaticityCoordinates b) { R = r; G = g; B = b; }
public void ChromaticityCoordinates() { var coordinates = new xyChromaticityCoordinates(1, 0.445); Assert.Equal("xy [x=1, y=0.45]", coordinates.ToString()); }
public RGBPrimariesChromaticityCoordinates(xyChromaticityCoordinates r, xyChromaticityCoordinates g, xyChromaticityCoordinates b) { _r = r; _g = g; _b = b; }
public RGBPrimariesChromaticityCoordinates(xyChromaticityCoordinates r, xyChromaticityCoordinates g, xyChromaticityCoordinates b) { _r = r; _g = g; _b = b; }