Copyied SimplexNoise class from private library.