magellan icon indicating copy to clipboard operation
magellan copied to clipboard

toDM and toDMS output should not have trailing zeros.

Open evdb opened this issue 10 years ago • 1 comments

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

evdb avatar Oct 16 '15 09:10 evdb

I don't have a strong opinion either way here...

captivationsoftware avatar Oct 17 '15 20:10 captivationsoftware