Skip to content

Commit 5aabd77

Browse files
author
Leonardo Gatica
committed
Fix generate longitude in randomData.
1 parent 7e2024d commit 5aabd77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-nmea",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Parser for NMEA sentences.",
55
"main": "lib",
66
"scripts": {

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function randomData(opts = {}) {
232232
}
233233

234234
if ((opts.longitude >= -180) && (opts.longitude <= 180)) {
235-
longitude = latToDmm(opts.longitude)
235+
longitude = lngToDmm(opts.longitude)
236236
} else {
237237
longitude = lngToDmm(chance.floating({min: -180, max: 180}))
238238
}

0 commit comments

Comments
 (0)