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) • 303 B
JavaScript
const compare = require("./compare.js");
/**
* @name sort
* @description sorts the given ranges and returns them. this mutates the original input.
* @param {Array<Range>} ranges
* @returns {Array<Range>} sorted ranges
*/
module.exports = function sort(ranges) {
return ranges.sort(compare);
};