Esempio n. 1
0
 def test_math_utils(self):
     ff = prime_factors(250)
     self.assertEqual(ff, [5, 5, 5, 2])
     div = divisors(560)
     self.assertEqual(
         div,
         [
             1,
             2,
             4,
             5,
             7,
             8,
             10,
             14,
             16,
             20,
             28,
             35,
             40,
             56,
             70,
             80,
             112,
             140,
             280,
             560,
         ],
     )
     center = get_center_of_arc([0.0, 0.0], [1.0, 0.0], 0.5)
     self.assertEqual(center, (0.5, 0.0))
Esempio n. 2
0
 def test_math_utils(self):
     ff = prime_factors(250)
     self.assertEqual(ff, [5, 5, 5, 2])
     div = divisors(560)
     self.assertEqual(div, [1, 2, 4, 5, 7, 8, 10, 14, 16, 20, 28, 35, 40, 56, 70, 80, 112, 140, 280, 560])
     center = get_center_of_arc([0.0, 0.0], [1.0, 0.0], 0.5)
     self.assertEqual(center, (0.5, 0.0))