From d66c4250f3bc93f4e26f61b0c4fba8545af75543 Mon Sep 17 00:00:00 2001 From: fdai7764 Date: Sun, 28 Jan 2024 15:45:09 +0100 Subject: [PATCH] added test for conversion of non-integer degrees to radians --- src/test/py/test_trigonometry.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/py/test_trigonometry.py b/src/test/py/test_trigonometry.py index e38fb9f..790be61 100644 --- a/src/test/py/test_trigonometry.py +++ b/src/test/py/test_trigonometry.py @@ -52,6 +52,12 @@ class MyTestCase(unittest.TestCase): delta *= -1 self.assertLess(delta, 0.01) + def test_56_point_7_deg_to_rad_should_be_point99(self): + delta = deg2rad(56.7) - 0.99 + if delta < 0: + delta *= -1 + self.assertLess(delta, 0.01) + def test_sin_0_should_be_0(self): self.assertEqual(sin_approx_bhaskara(0), 0)