Docs / Randomness

Glossary: GradientNoise

The members of GradientNoise, in alphabetical order.

Color legend plain property method

One layer of Perlin-style gradient noise from −1 to 1, on cells 1 unit wide, with no state, no table and no period.

A read-only struct: default(GradientNoise) is the noise of seed 0. The noise page shows it in context, with code.

Names are colored by what they are: a property or a method; values and fields keep the plain color.

Properties

Seed →

ulong · Read-only. The seed the noise was created with.

Fields

MaxCoordinate →

double · Constant. 2^40, about 1.1 × 10^12: the largest x and y, either sign, that Sample takes. Beyond it a double keeps too few digits after the point for smooth noise.

Methods

GradientNoise() →

GradientNoise(ulong seed) · Creates the noise of the seed.

Parameter Type Description
seed ulong Any value. Different seeds give unrelated fields.

Sample() →

Sample(double x, double y) · The noise at the point, from −1 to 1. 0 at every integer point. The same point gives the same value on every machine. Throws ArgumentOutOfRangeException for a coordinate that is NaN, infinite or beyond MaxCoordinate.

Parameter Type Description
x double The x coordinate, in cells: divide world units by the size of the features you want.
y double The y coordinate, in cells.