Package toxi.math

Interface InterpolateStrategy

All Known Implementing Classes:
BezierInterpolation, CircularInterpolation, CosineInterpolation, DecimatedInterpolation, ExponentialInterpolation, LinearInterpolation, SigmoidInterpolation, ThresholdInterpolation, ZoomLensInterpolation

public interface InterpolateStrategy
Defines a generic function to interpolate 2 float values.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    interpolate(double a, double b, double f)
    Implements an interpolation equation using double precision values.
    float
    interpolate(float a, float b, float f)
    Implements an interpolation equation using float values.
  • Method Details

    • interpolate

      double interpolate(double a, double b, double f)
      Implements an interpolation equation using double precision values.
      Parameters:
      a - current value
      b - target value
      f - normalized interpolation factor (0.0 .. 1.0)
      Returns:
      interpolated value
    • interpolate

      float interpolate(float a, float b, float f)
      Implements an interpolation equation using float values.
      Parameters:
      a - current value
      b - target value
      f - normalized interpolation factor (0.0 .. 1.0)
      Returns:
      interpolated value