Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## toxi.math
Class ExponentialInterpolation

    java.lang.Object
      toxi.math.ExponentialInterpolation

All Implemented Interfaces:
  InterpolateStrategy

    public class ExponentialInterpolation

extends java.lang.Object
implements InterpolateStrategy

Exponential curve interpolation with adjustable exponent. Use exp in the following ranges to achieve these effects:

- 0.0 < x < 1.0 : ease in (steep changes towards b)
- 1.0 : same as `LinearInterpolation`
- > 1.0 : ease-out (steep changes from a)

Constructor Summary
`ExponentialInterpolation()` Default constructor uses square parabola (exp=2)
`ExponentialInterpolation(float exp)`

Method Summary
`float` | `interpolate(float a, float b, float f)` Implements an interpolation equation.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExponentialInterpolation

    public ExponentialInterpolation()

  Default constructor uses square parabola (exp=2)

### ExponentialInterpolation

    public ExponentialInterpolation(float exp)

Parameters:
  `exp` - curve exponent

Method Detail

### interpolate

    public float interpolate(float a,
                             float b,
                             float f)

  Description copied from interface: `InterpolateStrategy`
  Implements an interpolation equation.

  Specified by:
    `interpolate` in interface `InterpolateStrategy`
  Parameters:
    `a` - current value
    `b` - target value
    `f` - normalized interpolation factor (0.0 .. 1.0)
  Returns:
    interpolated value

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD