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 CircularInterpolation

    java.lang.Object
      toxi.math.CircularInterpolation

All Implemented Interfaces:
  InterpolateStrategy

    public class CircularInterpolation

extends java.lang.Object
implements InterpolateStrategy

Implementation of the circular interpolation function. i = a-(b-a) * (sqrt(1 - (1 - f) * (1 - f) ))

Constructor Summary
`CircularInterpolation()`
`CircularInterpolation(boolean isFlipped)` The interpolation slope can be flipped to have its steepest ascent towards the end value, rather than at the beginning in the default configuration.

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

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

Constructor Detail

### CircularInterpolation

    public CircularInterpolation()

### CircularInterpolation

    public CircularInterpolation(boolean isFlipped)

  The interpolation slope can be flipped to have its steepest ascent towards the end value, rather than at the beginning in the default configuration.

  Parameters:
    `isFlipped` - true, if slope is inverted

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

### setFlipped

    public void setFlipped(boolean isFlipped)

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