Skip to content

Commit

Permalink
avoid crashing on low curvatures (rho=1e-3 gives a good approximation…
Browse files Browse the repository at this point in the history
… of a linear transform)
  • Loading branch information
Fil committed Jun 5, 2020
1 parent abfc0ae commit 098c2ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zoom.js
Expand Up @@ -63,7 +63,7 @@ export default (function zoomRho(rho, rho2, rho4) {
}

zoom.rho = function(_) {
var _1 = +_, _2 = _1 * _1, _4 = _2 * _2;
var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;
return zoomRho(_1, _2, _4);
};

Expand Down

0 comments on commit 098c2ed

Please sign in to comment.