We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91880c0 commit 67b9911Copy full SHA for 67b9911
js/src/openlocationcode.js
@@ -406,9 +406,9 @@
406
}
407
408
// How many degrees longitude is the code from the reference?
409
- if (codeArea.longitudeCenter - referenceLongitude > halfResolution) {
+ if (referenceLongitude + halfResolution < codeArea.longitudeCenter) {
410
codeArea.longitudeCenter -= resolution;
411
- } else if (referenceLongitude - codeArea.longitudeCenter > halfResolution) {
+ } else if (referenceLongitude - halfResolution > codeArea.longitudeCenter) {
412
codeArea.longitudeCenter += resolution;
413
414
0 commit comments