All Superinterfaces:
ToDoubleFunction<double[]>
All Known Implementing Classes:
ReturnDistanceFunctionType

public interface ReturnDistanceFunction extends ToDoubleFunction<double[]>
Interface marking the implementing class as a return type function for noise generation. On Creation of the NoiseGenerator a check will be sent to isValidArrayLength(int) to see if the expected array length (a.k.a. depth) is supported.
  • Method Details

    • applyAsDouble

      double applyAsDouble(double[] distances)
      Specified by:
      applyAsDouble in interface ToDoubleFunction<double[]>
      Parameters:
      distances - an array containing the shortest distances (sorted from 0).
      Returns:
      the combined/denoted distance created from the specified distances.
    • isValidArrayLength

      boolean isValidArrayLength(int depth)
      Called once on creation of a NoiseGenerator (if using ReturnDistanceFunction).
      Parameters:
      depth - the amount of distances that will be stored (i.e. the length of the distances array for applyAsDouble(double[])).
      Returns:
      true if the depth is supported, false otherwise.