-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Edge cases on some whole minute boundaries cause issues due to floating point precision:
`
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from geodepy.angles import hp2dec, dec2hp
dec2hp(1.083333333333333333333333)
1.046
hp2dec(0.15)
Traceback (most recent call last):
File "", line 1, in
File "C:\geodepy\angles.py", line 1024, in hp2dec
raise ValueError(f'Invalid HP Notation: 3rd decimal place greater '
ValueError: Invalid HP Notation: 3rd decimal place greater than 5: 0.15
hp2dec(20.2)
Traceback (most recent call last):
File "", line 1, in
File "C:\geodepy\angles.py", line 1024, in hp2dec
raise ValueError(f'Invalid HP Notation: 3rd decimal place greater '
ValueError: Invalid HP Notation: 3rd decimal place greater than 5: 20.2
hp2dec(20.02)
Traceback (most recent call last):
File "", line 1, in
File "C:\geodepy\angles.py", line 1024, in hp2dec
raise ValueError(f'Invalid HP Notation: 3rd decimal place greater '
ValueError: Invalid HP Notation: 3rd decimal place greater than 5: 20.02
hp2dec(133.4800)
Traceback (most recent call last):
File "", line 1, in
File "C:\geodepy\angles.py", line 1024, in hp2dec
raise ValueError(f'Invalid HP Notation: 3rd decimal place greater '
ValueError: Invalid HP Notation: 3rd decimal place greater than 5: 133.48
`