コード例 #1
0
 def test_tan(self):
     for angle_tuple in self.tan_angles:
         self.assertAlmostEqual(calculate("tan", angle_tuple[0], "degree"),
                                angle_tuple[1])
         self.assertAlmostEqual(
             calculate("tan", math.radians(angle_tuple[0]), "radian"),
             angle_tuple[1])
コード例 #2
0
 def test_tanh(self):
     self.assertEqual(calculate("tanh", 10, "degree"),
                      math.tanh(math.radians(10)))
     self.assertEqual(calculate("tanh", 90, "radian"), math.tanh(90))
コード例 #3
0
 def test_atan(self):
     self.assertEqual(calculate("atan", 10, "degree"),
                      math.atan(math.radians(10)))
     self.assertEqual(calculate("atan", 1, "radian"), math.atan(1))
コード例 #4
0
 def test_tanh(self):
     self.assertEqual(calculate("tanh", 10, "degree"), math.tanh(math.radians(10)))
     self.assertEqual(calculate("tanh", 90, "radian"), math.tanh(90))
コード例 #5
0
 def test_atan(self):
     self.assertEqual(calculate("atan", 10, "degree"), math.atan(math.radians(10)))
     self.assertEqual(calculate("atan", 1, "radian"), math.atan(1))
コード例 #6
0
 def test_tan(self):
     for angle_tuple in self.tan_angles:
         self.assertAlmostEqual(calculate("tan", angle_tuple[0], "degree"), angle_tuple[1])
         self.assertAlmostEqual(calculate("tan", math.radians(angle_tuple[0]), "radian"), angle_tuple[1])