@Test public void testInterpolationV1() { Vector1 begin = new Vector1(0); Vector1 out = new Vector1(1); Vector1 in = new Vector1(9); Vector1 end = new Vector1(10); BezierInterpolator<Vector1> classToBeTested = new BezierInterpolator<Vector1>(begin, out, in, end); assertEqualsWithError(0.0, allowableError, classToBeTested.computeValue(0).x); assertEqualsWithError(10.0, allowableError, classToBeTested.computeValue(1).x); for (double percent = 0; percent <= 1.0; percent+=0.1) { classToBeTested.computeValue(percent); } }
@Override public V computeValue(double percent) { if (bezier == null) { bezier = getBezier(); } return bezier.pointAt(percent); }
BezierInterpolator implements Interpolator<V> { @Override public V computeValue(double percent) { if (bezier == null) { bezier = getBezier(); } return bezier.pointAt(percent); } }
BezierInterpolator implements Interpolator<V> { @Override public V computeValue(double percent) { if (bezier == null) { bezier = getBezier(); } return bezier.pointAt(percent); } BezierInterpolator(V begin, V out, V in, V end); }
BezierInterpolator implements Interpolator<V> { @Override public V computeValue(double percent) { if (bezier == null) { bezier = getBezier(); } return bezier.pointAt(percent); } BezierInterpolator(V begin, V out, V in, V end); @Override V computeValue(double percent); void setControlPoints(V begin, V out, V in, V end); V getBegin(); void setBegin(V begin); V getOut(); void setOut(V out); V getIn(); void setIn(V in); V getEnd(); void setEnd(V end); }
BezierInterpolator implements Interpolator<V> { @Override public V computeValue(double percent) { if (bezier == null) { bezier = getBezier(); } return bezier.pointAt(percent); } BezierInterpolator(V begin, V out, V in, V end); @Override V computeValue(double percent); void setControlPoints(V begin, V out, V in, V end); V getBegin(); void setBegin(V begin); V getOut(); void setOut(V out); V getIn(); void setIn(V in); V getEnd(); void setEnd(V end);  }