Uniform distribution from a fractal Perlin noise function in C#
My Perlin noise function (which adds up 6 octaves of 3D simplex at 0.75 persistence) generates a 2D array array of double s. These numbers each come out normalized to [-1, 1], with mean at 0. I clamp them to avoid exceptions, which I think are due to floating-point accuracy issues, but I am fairly sure my scaling factor is good enough for restricting the noise output to exactly this neighborhood in the ideal case. Anyway, that's all details. The point is, here is a 256-by-256 array of noise: The histogram with a normal fit looks like this: Matlab's lillietest is a function which applies the