Skip to content

Commit

Permalink
fixes armadillo inverse
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Apr 18, 2020
1 parent d769c49 commit 3d2f387
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/armadillo.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export function armadilloRaw(phi0) {
denominator = dxdPhi * dydLambda - dydPhi * dxdLambda,
dLambda = (fy * dxdPhi - fx * dydPhi) / denominator / 2,
dPhi = (fx * dydLambda - fy * dxdLambda) / denominator;
if (abs(dPhi) > 2) dPhi /= 2;
lambda -= dLambda, phi -= dPhi;
} while ((abs(dLambda) > epsilon || abs(dPhi) > epsilon) && --i > 0);
return sPhi0 * phi > -atan2(cos(lambda), tanPhi0) - 1e-3 ? [lambda * 2, phi] : null;
Expand Down

0 comments on commit 3d2f387

Please sign in to comment.