Browse Source

added test for rad to degree conversion with non-integer rad number

remotes/origin/feature/feature-trigonometry
fdai7764 11 months ago
parent
commit
2ef0b6a798
  1. 6
      src/test/py/test_trigonometry.py

6
src/test/py/test_trigonometry.py

@ -30,6 +30,12 @@ class MyTestCase(unittest.TestCase):
delta *= -1 delta *= -1
self.assertLess(delta, 0.01) self.assertLess(delta, 0.01)
def test_rad_point35_to_deg_should_be_200_point_535(self):
delta = rad2deg(3.5) - 200.535
if delta < 0:
delta *= -1
self.assertLess(delta, 0.01)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Loading…
Cancel
Save