public Perlin(int seed) { ThreadSafeRandom rand = new ThreadSafeRandom(seed); Shufflepermutation(rand); }
public void Shufflepermutation(ThreadSafeRandom rand) { for(int i = 0; i < perm.Length; i++) { int j = rand.Next(0, i); byte temp = perm[j]; perm[j] = perm[i]; perm[i] = temp; } }