- self.assertAlmostEqual(distPF1 + distPF2, 2.0 * theEllipticArc.majorRadius().value(), 7 - math.floor(math.log10(theEllipticArc.majorRadius().value())))
+ DIGITS = 7 - math.ceil(math.log10(theEllipticArc.majorRadius().value()))
+ self.assertAlmostEqual(distPF1 + distPF2, 2.0 * theEllipticArc.majorRadius().value(), DIGITS)
+
+ def checkAlmostEqual(self, theValue1, theValue2):
+ DIGITS = 7 - math.ceil(math.log10(theValue1))
+ self.assertAlmostEqual(theValue1, theValue2, DIGITS)