This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Algorithm inspired by https://gist.github.com/Flafla2/1a0b9ebef678bbce3215 | |
| public class PerlinGen | |
| { | |
| private readonly int[] p; // Randomly shuffled array of values from 0 to 255. | |
| // Values are repeated twice to get performance boost | |
| // from avoiding the use of modulo operator. | |
| public PerlinGen(int seed) | |
| { |