fCraft.MapGenerator.GenerateHeightmap C# (CSharp) Method

GenerateHeightmap() private method

private GenerateHeightmap ( int iWidth, int iHeight ) : ].double[
iWidth int
iHeight int
return ].double[
        double[,] GenerateHeightmap(int iWidth, int iHeight)
        {
            double c1, c2, c3, c4;
            double[,] points = new double[iWidth + 1, iHeight + 1];

            //Assign the four corners of the intial grid random color values
            //These will end up being the colors of the four corners
            c1 = parameters.sides + (rand.rnd.NextDouble() - 0.5) * 0.05;
            c2 = parameters.sides + (rand.rnd.NextDouble() - 0.5) * 0.05;
            c3 = parameters.sides + (rand.rnd.NextDouble() - 0.5) * 0.05;
            c4 = parameters.sides + (rand.rnd.NextDouble() - 0.5) * 0.05;
            parameters.gBigSize = iWidth + iHeight;
            DivideGrid(ref points, 0, 0, iWidth, iHeight, c1, c2, c3, c4, true);
            return points;
        }