Package swingtree.api
Interface FloatFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Used by
NoiseFunction.andThen(FloatFunction)
to apply a scalar function to the result of a noise function
or to the input of a noise function using NoiseFunction.compose(FloatFunction)
.-
Method Summary
Modifier and TypeMethodDescriptiondefault FloatFunction
andThen
(FloatFunction after) Allows you to compose this function with another function so that the other function is applied after this function.default FloatFunction
compose
(FloatFunction before) Allows you to compose this function with another function so that the other function is applied before this function.float
from
(float in) Applies this function to the given float value and returns the result.
-
Method Details
-
from
float from(float in) Applies this function to the given float value and returns the result.- Parameters:
in
- The input float value.- Returns:
- The output float value.
-
andThen
Allows you to compose this function with another function so that the other function is applied after this function.- Parameters:
after
- The function to apply after this function.- Returns:
- A new function that applies this function and then the given function.
-
compose
Allows you to compose this function with another function so that the other function is applied before this function.- Parameters:
before
- The function to apply before this function.- Returns:
- A new function that applies the given function and then this function.
-