UNPKG

dufour-peyton-intersection

Version:

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

10 lines (8 loc) 192 B
"use strict"; module.exports = function eachPair(arr, callback) { for (let i = 1; i < arr.length; i++) { const a = arr[i - 1]; const b = arr[i]; callback([a, b], i - 1); } };