UNPKG

dufour-peyton-intersection

Version:

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

12 lines (10 loc) 260 B
"use strict"; /** * @name roundDown * @description like Math.round, but numbers in the middle are rounded down not up * @param {Number} n * @returns {Number} rounded number */ module.exports = function roundDown(n) { return -1 * Math.round(-1 * n); };