Пример #1
0
    public static float[,] GenerateWhiteNoiseMap(int width, int height, IRandomNumberGenerator rng)
    {
        var map = new float[width, height];

        for (var w = 0; w < width; ++w)
        {
            for (var h = 0; h < height; ++h)
            {
                map[w, h] = rng.Float();
            }
        }

        return(map);
    }
Пример #2
0
 public object GetValue(IRandomNumberGenerator rng)
 {
     return(Vector3.Lerp(this.min, this.max, rng.Float()));
 }