Fix typo (thx evolvedexperiment)

This commit is contained in:
GoteGuru 2022-04-06 17:42:48 +00:00
parent 3827f878e7
commit 1bf71c25fa

View file

@ -174,14 +174,14 @@ window.Submap = (function () {
throw new Error("should be the same type.") throw new Error("should be the same type.")
} }
const [oldpx, oldpy] = oldCells.p[oid]; const [oldpx, oldpy] = oldCells.p[oid];
const nd = distance(projection(oldpx, oldpx, false)); const nd = distance(projection(oldpx, oldpy, false));
if (!nd) { if (!nd) {
console.error("no distance!", nd, "old point", oldp) console.error("no distance!", nd, "old point", oldpx, oldpy)
} }
if (nd < d) [d, oldid] = [nd, oid]; if (nd < d) [d, oldid] = [nd, oid];
}) })
if (!oldid) { if (!oldid) {
console.warn("Warning, no match for", id, "parent", gridCellId, "in"); console.warn("Warning, no match for", id, "(parent:", gridCellId, ")");
continue; continue;
} }
} }