UNPKG

proj4

Version:

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

9 lines (7 loc) 184 B
export default function (x, y) { x = Math.abs(x); y = Math.abs(y); var a = Math.max(x, y); var b = Math.min(x, y) / (a ? a : 1); return a * Math.sqrt(1 + Math.pow(b, 2)); }