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

13 lines
307 B
JavaScript

import fL from './fL';
export default function(eccent, ts) {
var phi = fL(1, ts);
var Iphi = 0;
var con = 0;
do {
Iphi = phi;
con = eccent * Math.sin(Iphi);
phi = fL(Math.exp(eccent * Math.log((1 + con) / (1 - con)) / 2), ts);
} while (Math.abs(phi - Iphi) > 1.0e-12);
return phi;
}