Package jme3utilities.math.noise
Class Permutation
java.lang.Object
jme3utilities.math.noise.Permutation
Cyclic permutation of the integers from 0 to length-1, for use in noise
functions.
-
Constructor Summary
ConstructorsConstructorDescriptionPermutation(int length, long seed) Construct a permutation with the specified length from a specified seed. -
Method Summary
Modifier and TypeMethodDescriptionintpermute(int index) Permute an index, wrapping at the end of the table.
-
Constructor Details
-
Permutation
public Permutation(int length, long seed) Construct a permutation with the specified length from a specified seed.- Parameters:
length- length of the permutation (>1)seed- seed for generating pseudo-random numbers
-
-
Method Details
-
permute
public int permute(int index) Permute an index, wrapping at the end of the table.- Parameters:
index- input- Returns:
- (<length, ≥0)
-