invlatiso.js 307 B

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