public void TestFromFloatSubZeroDecimal() { const float expected = -1.007147101f; var fl = FloatOperations.FromFloat(expected); Assert.AreEqual(expected, fl.ToDecimal()); }
public void TestFromFloatSubOneDecimal() { const float expected = 0.0013581f; var fl = FloatOperations.FromFloat(expected); Assert.AreEqual(expected, fl.ToDecimal()); }
public void TestFromFloatNegative() { const float expected = -1015f; var fl = FloatOperations.FromFloat(expected); Assert.AreEqual(expected, fl.ToDecimal()); }
public void TestFromFloatDecimalNumber() { const float expected = 18.000481f; var fl = FloatOperations.FromFloat(expected); Assert.AreEqual(expected, fl.ToDecimal()); }