UNPKG

proj4

Version:

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

6 lines (5 loc) 155 B
var HALF_PI = Math.PI/2; var sign = require('./sign'); module.exports = function(x) { return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI)); };