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 TWO_PI = Math.PI * 2; var sign = require('./sign'); module.exports = function(x) { return (Math.abs(x) < Math.PI) ? x : (x - (sign(x) * TWO_PI)); };