Skip to content

toDM and toDMS output should not have trailing zeros. #12

@evdb

Description

@evdb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions