1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-30 03:30:34 +02:00
This commit is contained in:
Pomax
2016-01-12 13:39:35 -08:00
parent 98bb8d5a86
commit 8db94a3f50
26 changed files with 129 additions and 93 deletions

View File

@@ -102,9 +102,9 @@ var CurveIntersections = React.createClass({
});
// filter out likely duplicates
var curr = results[0], _, same = ((a,b) => abs(a.t1-b.t1) < 0.01 && abs(a.t2-b.t2) < 0.01);
for(var i=1; i<results.length; i++) {
var _ = results[i];
var curr = results[0], _, i, same = ((a,b) => abs(a.t1-b.t1) < 0.01 && abs(a.t2-b.t2) < 0.01);
for(i=1; i<results.length; i++) {
_ = results[i];
if (same(curr, _)) {
results.splice(i--,1);
} else { curr = _; }