示例#1
0
        public void TestFromFloatSubZeroDecimal()
        {
            const float expected = -1.007147101f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
示例#2
0
        public void TestFromFloatSubOneDecimal()
        {
            const float expected = 0.0013581f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
示例#3
0
        public void TestFromFloatNegative()
        {
            const float expected = -1015f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }
示例#4
0
        public void TestFromFloatDecimalNumber()
        {
            const float expected = 18.000481f;
            var         fl       = FloatOperations.FromFloat(expected);

            Assert.AreEqual(expected, fl.ToDecimal());
        }