UNPKG

proj4

Version:

Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.

13 lines (12 loc) 313 B
var fL = require('./fL'); module.exports = 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; };