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])
def test_tanh(self): self.assertEqual(calculate("tanh", 10, "degree"), math.tanh(math.radians(10))) self.assertEqual(calculate("tanh", 90, "radian"), math.tanh(90))
def test_atan(self): self.assertEqual(calculate("atan", 10, "degree"), math.atan(math.radians(10))) self.assertEqual(calculate("atan", 1, "radian"), math.atan(1))
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])