Class ClampModifier
java.lang.Object
de.articdive.jnoise.modifiers.clamp.ClampModifier
- All Implemented Interfaces:
NoiseModifier
Simple Modifier that clamps the noise output between 2 values.
-
Constructor Summary
ConstructorDescriptionClampModifier
(double lower, double upper) Creates a new ClampModifier that clamps the noise output value between 2 values. -
Method Summary
-
Constructor Details
-
ClampModifier
public ClampModifier(double lower, double upper) Creates a new ClampModifier that clamps the noise output value between 2 values.- Parameters:
lower
- the lower value to clamp between.upper
- the higher value to clamp between.
-
-
Method Details
-
apply
public double apply(double result) Description copied from interface:NoiseModifier
Modifies a noise value.- Specified by:
apply
in interfaceNoiseModifier
- Parameters:
result
- noise value to modify.- Returns:
- modified noise value.
-