dbarbalato / magellan

JavaScript Latitude and Longitude Validation and Formatting
18 stars 12 forks source link

.toDD() not formatting correctly #16

Open njemanuel01 opened 7 years ago

njemanuel01 commented 7 years ago

Working with magellan in my application I've found that: magellan('60 S').latitude().toDD() returns '60.0000' instead of '-60.0000' and magellan('150 W').longitude().toDD() returns '150.0000' instead of '-150.0000'

It appears to be an issue in lns 127/128, should decimal > 0 read decimal >= 0?