tethys-feature-service/node_modules/proj4/lib/common/gatg.js

16 lines
260 B
JavaScript
Raw Permalink Normal View History

2023-10-02 13:04:02 +00:00
export default function(pp, B) {
var cos_2B = 2 * Math.cos(2 * B);
var i = pp.length - 1;
var h1 = pp[i];
var h2 = 0;
var h;
while (--i >= 0) {
h = -h2 + cos_2B * h1 + pp[i];
h2 = h1;
h1 = h;
}
return (B + h * Math.sin(2 * B));
}