Class RandomNoise

java.lang.Object
com.sk89q.worldedit.math.noise.RandomNoise
All Implemented Interfaces:
NoiseGenerator

public class RandomNoise extends Object implements NoiseGenerator
Generates noise using Random. Every time a noise generating function is called, a new value will be returned.
  • Constructor Details

    • RandomNoise

      public RandomNoise(Random random)
      Create a new noise generator using the given Random.
      Parameters:
      random - the random instance
    • RandomNoise

      public RandomNoise()
      Create a new noise generator with a newly constructed Random instance.
  • Method Details

    • noise

      public float noise(Vector2 position)
      Description copied from interface: NoiseGenerator
      Get the noise value for the given position. The returned value may change on every future call for the same position.
      Specified by:
      noise in interface NoiseGenerator
      Parameters:
      position - the position
      Returns:
      a noise value between 0 (inclusive) and 1 (inclusive)
    • noise

      public float noise(Vector3 position)
      Description copied from interface: NoiseGenerator
      Get the noise value for the given position. The returned value may change on every future call for the same position.
      Specified by:
      noise in interface NoiseGenerator
      Parameters:
      position - the position
      Returns:
      a noise value between 0 (inclusive) and 1 (inclusive)