Java Reference
In-Depth Information
developer's life easier and allows the designer to make a choice from a reasonably small set of good
options. The
Interpolator
presented in Listing 5-8 is an example of this type of simplification.
Listing 5-8.
WindupOvershootInterpolator.fx
public var WINDUP_OVERSHOOT = PolynomialInterpolator{
coefficients: [-1.25564,6.842106,-4.586466]
}
public var OVERSHOOT = PolynomialInterpolator{
coefficients: [0.6992483,2.581203,-2.1804514]
}
public var WINDUP = PolynomialInterpolator{
coefficients: [-0.95488644,4.135338,-2.1804514]
}
public class WindupOvershootInterpolator extends PolynomialInterpolator{
}
The class
WindupOvershootInterpolator
extends
PolynomialInterpolator
and provides three static
instances. The values used in creating the static instances came from playing with the accompanying
demo application. Figure 5-7 shows the
WINDUP
_
OVERSHOOT
interpolator, as
OVERSHOOT
and
WINDUP
are
simply the beginning and end of
WINDUP_OVERSHOOT
.