Interface InverseInterpolator<T>

Type Parameters:
T - The type that the InverseInterpolator will operate on.
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface InverseInterpolator<T>
An inverse interpolation function which determines where within an interpolation range an object lies. This behavior can be linear or nonlinear.
  • Method Summary

    Modifier and Type Method Description
    static InverseInterpolator<Double> forDouble()
    Returns inverse interpolator for Double.
    double inverseInterpolate​(T startValue, T endValue, T q)
    Return where within interpolation range [0, 1] q is between startValue and endValue.
  • Method Details

    • inverseInterpolate

      double inverseInterpolate​(T startValue, T endValue, T q)
      Return where within interpolation range [0, 1] q is between startValue and endValue.
      Parameters:
      startValue - Lower part of interpolation range.
      endValue - Upper part of interpolation range.
      q - Query.
      Returns:
      Interpolant in range [0, 1].
    • forDouble

      Returns inverse interpolator for Double.
      Returns:
      Inverse interpolator for Double.