magellan
magellan copied to clipboard
toDM and toDMS output should not have trailing zeros.
Is there a reason for having the trailing zeros as a result of the toFixed calls? I think that they make the output less readable.
Ideally this added to the test suite should pass:
var test_coords = magellan('1° 2\' 3.3" N');
assert.equal('1°2.055\'N', test_coords.toDM()); // currently 1°2.0550'N
assert.equal('1°2\'3.3"N"', test_coords.toDMS()); // currently 1°2'3.3000"N
I don't have a strong opinion either way here...