Home | History | Annotate | Download | only in base

Lines Matching full:points

81   vec2.interpolatePiecewiseFunction = function(points, x) {
82 if (x < points[0][0])
83 return points[0][1];
84 for (var i = 1; i < points.length; ++i) {
85 if (x < points[i][0]) {
86 var percent = normalize(x, points[i - 1][0], points[i][0]);
87 return lerp(percent, points[i - 1][1], points[i][1]);
90 return points[points.length - 1][1];