Lines Matching refs:fixedToFloat
3 from fontTools.misc.fixedTools import fixedToFloat, floatToFixed
12 self.assertEqual(value, floatToFixed(fixedToFloat(value, bits), bits))
15 self.assertEqual(0.8, fixedToFloat(13107, 14))
16 self.assertEqual(0.0, fixedToFloat(0, 14))
17 self.assertEqual(1.0, fixedToFloat(16384, 14))
18 self.assertEqual(-1.0, fixedToFloat(-16384, 14))
19 self.assertEqual(0.99994, fixedToFloat(16383, 14))
20 self.assertEqual(-0.99994, fixedToFloat(-16383, 14))
23 self.assertAlmostEqual(-9.98, fixedToFloat(-639, 6))
24 self.assertAlmostEqual(-10.0, fixedToFloat(-640, 6))
25 self.assertAlmostEqual(9.98, fixedToFloat(639, 6))
26 self.assertAlmostEqual(10.0, fixedToFloat(640, 6))
37 value = fixedToFloat(16384, 14)