示例#1
0
 public PerlinNoise([NotNull] Random rand, int octaves)
 {
     if (rand == null)
     {
         throw new ArgumentNullException("rand");
     }
     this.octaves = octaves;
     noiseLayers  = new ImprovedNoise[octaves];
     for (int i = 0; i < octaves; i++)
     {
         noiseLayers[i] = new ImprovedNoise(rand);
     }
 }
示例#2
0
 public PerlinNoise( [NotNull] Random rand, int octaves )
 {
     if( rand == null ) throw new ArgumentNullException( "rand" );
     this.octaves = octaves;
     noiseLayers = new ImprovedNoise[octaves];
     for( int i = 0; i < octaves; i++ ) {
         noiseLayers[i] = new ImprovedNoise( rand );
     }
 }