Changeset 33171 in osm for applications/editors/josm
- Timestamp:
- 2017-02-27T12:30:17+01:00 (8 years ago)
- Location:
- applications/editors/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/splinex/src/org/openstreetmap/josm/plugins/Splinex/SplineHitTest.java
r32918 r33171 26 26 27 27 public boolean checkCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4) { 28 return checkCurve(x1, y1, x2, y2, x3, y3, x4, y4, 32); 29 } 30 public boolean checkCurve(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4, int depth) { 28 31 if (Main.isDebugEnabled()) { 29 32 Main.debug("checkCurve {0} {1} {2} {3} {4} {5} {6} {7}", x1, y1, x2, y2, x3, y3, x4, y4); … … 77 80 if (checkPoint(x1234, y1234)) 78 81 return true; 79 return checkCurve(x1, y1, x12, y12, x123, y123, x1234, y1234) 80 || checkCurve(x1234, y1234, x234, y234, x34, y34, x4, y4); 82 if (depth <= 0) 83 return false; 84 return checkCurve(x1, y1, x12, y12, x123, y123, x1234, y1234, depth - 1) 85 || checkCurve(x1234, y1234, x234, y234, x34, y34, x4, y4, depth - 1); 81 86 } 82 87 }
Note:
See TracChangeset
for help on using the changeset viewer.