UNPKG

dufour-peyton-intersection

Version:

Reference Implementation of the Dufour-Peyton Intersection Algorithm. Calculates the Intersections of Arbitrary Polygons with a Geospatial Raster.

8 lines (6 loc) 136 B
"use strict"; module.exports = function clamp(n, min, max) { if (n < min) return min; else if (n > max) return max; return n; };