From 909d8e2532a1ba10a234e871244eb6f87a6ad3a4 Mon Sep 17 00:00:00 2001 From: fdai7764 Date: Sun, 28 Jan 2024 13:27:11 +0100 Subject: [PATCH] added test for rad to degree conversion with negative rad number --- 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 8e06ee1..ac5e3c2 100644 --- a/src/test/py/test_trigonometry.py +++ b/src/test/py/test_trigonometry.py @@ -24,6 +24,12 @@ class MyTestCase(unittest.TestCase): delta *= -1 self.assertLess(delta, 0.01) + def test_rad_negative_1_to_deg_should_be_negative_57_point_296(self): + delta = rad2deg(-1) - -57.296 + if delta < 0: + delta *= -1 + self.assertLess(delta, 0.01) + if __name__ == '__main__': unittest.main()