Closed barrer closed 6 years ago
chrome version: 63.0 *It should be '`Math.`'.**
// generic "bored function" factory, Caijun 2014 // gcj: 4 calls to wgs_gcj; ~0.1mm acc function __bored__(fwd, rev) { return function rev_bored(heck, checkChina = true) { var curr = rev(heck, checkChina) var prev = heck var diff = {lat: Infinity, lon: Infinity} // Wait till we hit fixed point or get bored var i = 0 while (max(abs(diff.lat), abs(diff.lon)) > PRC_EPS && i++ < 10) { diff = _coord_diff(fwd(curr, checkChina), heck) prev = curr curr = _coord_diff(curr, diff) } return curr } }
Good catch. I was copying from the Mini PDF implementation which imported those things from Math…
Math
Should be fixed now.
chrome version: 63.0 *It should be '`Math.`'.**