Created
March 5, 2014 16:21
-
-
Save danslimmon/9370521 to your computer and use it in GitHub Desktop.
Test cases for converting a floating-point number of degrees to the format DDDMM.MMM where 'DDD' is the up-to-three-digit number of degrees and 'MM.MMM' is the 0-padded number of minutes to exactly three decimal places.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_cases = [ | |
{'in': (31.21972,), 'out': '3113.183'}, | |
{'in': (149.999999,), 'out': '15000.000'}, | |
{'in': (-179.999999,), 'out': '18000.000'}, | |
{'in': (-7.000991,), 'out': '-0700.059'}, | |
{'in': (3.141593,), 'out': '0308.496'}, | |
{'in': (0.0,), 'out': '0000.000'}, | |
{'in': (-0.999999,), 'out': '-0100.000'}, | |
{'in': (-86.83141,), 'out': '-8649.885'}, | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment