Half fix for some sliders

which doesn't have enough distance in the curve to reach the end.
This commit is contained in:
fd 2015-02-27 00:04:58 -05:00
parent ad5277882e
commit 9c2c5e309a

View File

@ -109,8 +109,13 @@ public class LinearBezier extends Curve {
if (iter.hasNext()) {
curBezier = iter.next();
curPoint = 0;
} else
} else {
curPoint = curBezier.points() - 1;
if(lastDistanceAt == distanceAt){
//out of points even though we haven't reached the preferred distance.
break;
}
}
}
}
Vec2f thisCurve = curBezier.getCurve()[curPoint];