public void TestPixelDPI() { PixelUnit pixel = 1000d; DPIUnit dpi = 600d; InchUnit inch = 25d; Assert.AreEqual(1000d / 600d, pixel.ToInchLength(dpi).Value); Assert.AreEqual(25d / (1d / 600d), inch.ToPixelCount(dpi).Value); }
public void TestDPI() { DPIUnit val1 = 100d; DPIUnit val2 = 10d; Assert.AreEqual(110d, (val1 + val2).Value); Assert.AreEqual(90d, (val1 - val2).Value); Assert.AreEqual(1000d, (val1 * val2).Value); Assert.AreEqual(10d, (val1 / val2).Value); }