Interface ReturnDistanceFunction
- All Superinterfaces:
ToDoubleFunction<double[]>
- All Known Implementing Classes:
ReturnDistanceFunctionType
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 Summary
Modifier and TypeMethodDescriptiondouble
applyAsDouble
(double[] distances) boolean
isValidArrayLength
(int depth) Called once on creation of aNoiseGenerator
(if usingReturnDistanceFunction
).
-
Method Details
-
applyAsDouble
double applyAsDouble(double[] distances) - Specified by:
applyAsDouble
in interfaceToDoubleFunction<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 aNoiseGenerator
(if usingReturnDistanceFunction
).- Parameters:
depth
- the amount of distances that will be stored (i.e. the length of the distances array forapplyAsDouble(double[])
).- Returns:
- true if the depth is supported, false otherwise.
-