Exemplo n.º 1
0
        public void Fixed_ConvertPrecision()
        {
            var f1 = new Fixed <T>(112);
            var f2 = f1.ConvertTo <Q8_24>();
            var f3 = f1.ConvertTo <Q16_16>();
            var f4 = f1.ConvertTo <Q24_8>();

            Assert.AreEqual((double)f1, (double)f2);
            Assert.AreEqual((double)f1, (double)f3);
            Assert.AreEqual((double)f1, (double)f4);
        }