tethys-feature-service/node_modules/proj4/lib/common/gatg.js
2023-10-02 15:04:02 +02:00

16 lines
260 B
JavaScript

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));
}