Class ClampModifier

java.lang.Object
de.articdive.jnoise.modifiers.clamp.ClampModifier
All Implemented Interfaces:
NoiseModifier

public final class ClampModifier extends Object implements NoiseModifier
Simple Modifier that clamps the noise output between 2 values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClampModifier(double lower, double upper)
    Creates a new ClampModifier that clamps the noise output value between 2 values.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    apply(double result)
    Modifies a noise value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface NoiseModifier
      Parameters:
      result - noise value to modify.
      Returns:
      modified noise value.