Fixes some sliders with too much control points.

This commit is contained in:
fd
2015-03-07 20:54:16 -05:00
parent 64755bbc5c
commit 421cfad6ad
2 changed files with 20 additions and 18 deletions

View File

@@ -87,13 +87,4 @@ public abstract class Curve {
return a * (1 - t) + b * t;
}
/**
* A recursive method to evaluate polynomials in Bernstein form or Bezier curves.
* http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
*/
protected float deCasteljau(float[] a, int i, int order, float t) {
if (order == 0)
return a[i];
return lerp(deCasteljau(a, i, order - 1, t), deCasteljau(a, i + 1, order - 1, t), t);
}
}