File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 88
99
1010'use strict' ;
11+
1112var dot = require ( './matrix' ) . dot ;
1213
14+ var polygon = module . exports = { } ;
15+
1316/**
1417 * Turn an array of [x, y] pairs into a polygon object
1518 * that can test if points are inside it
@@ -26,8 +29,6 @@ var dot = require('./matrix').dot;
2629 * don't double-count the edge where they meet.
2730 * returns boolean: is pt inside the polygon (including on its edges)
2831 */
29- var polygon = module . exports = { } ;
30-
3132polygon . tester = function tester ( ptsIn ) {
3233 var pts = ptsIn . slice ( ) ,
3334 xmin = pts [ 0 ] [ 0 ] ,
Original file line number Diff line number Diff line change 88
99
1010'use strict' ;
11+
1112var polygon = require ( '../../lib/polygon' ) ;
13+
1214var axes = require ( './axes' ) ;
15+
1316var filteredPolygon = polygon . filter ;
1417var polygonTester = polygon . tester ;
1518var BENDPX = 1.5 ; // max pixels off straight before a line counts as bent
You can’t perform that action at this time.
0 commit comments