Table of Contents

Class Noise

Namespace
LibGameAI.PCG
Assembly
PCG.dll
public static class Noise
Inheritance
Noise
Inherited Members

Methods

MPD(float[], float, Func<float>)

Midpoint displacement algorithm for 2D landscapes.

public static void MPD(float[] heights, float roughness, Func<float> nextFloat)

Parameters

heights float[]

Array to fill with landscape heights, zero-centered in average.

roughness float

Landscape roughness, between 0 (flat landscape) and 1 (very rough landscape).

nextFloat Func<float>

Function which should return a random float between 0 and 1.