C# Класс LibNoise.NMath

Provides math operations not found in System.Math.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
DEG_TO_RAD double
PI double
RAD_TO_DEG double
Sqrt2 double
Sqrt3 double

Открытые методы

Метод Описание
ClampValue ( double value, double lowerBound, double upperBound ) : double
ClampValue ( int value, int lowerBound, int upperBound ) : int

Returns the given value clamped between the given lower and upper bounds. - @a value if @a value lies between @a lowerBound and @a upperBound. - @a lowerBound if @a value is less than @a lowerBound. - @a upperBound if @a value is greater than @a upperBound.

CubicInterpolate ( double n0, double n1, double n2, double n3, double a ) : double

Returns the cubic interpolation of two values bound between two other values.

GetLarger ( double a, double b ) : double

Returns the larger of the two given numbers.

GetSmaller ( double a, double b ) : double

Returns the smaller of the two given numbers.

GradientCoherentNoise ( double x, double y, double z, int seed, NoiseQuality noiseQuality ) : double
GradientNoise ( double fx, double fy, double fz, int ix, int iy, int iz, long seed ) : double
IntValueNoise ( int x, int y, int z, int seed ) : int
LatLonToXYZ ( double lat, double lon, double &x, double &y, double &z ) : void

Provides the X, Y, and Z coordinates on the surface of a sphere cooresponding to the given latitude and longitude.

LinearInterpolate ( double n0, double n1, double a ) : double

Returns the linear interpolation of two values with the given alpha.

MakeInt32Range ( double n ) : double

Returns the given value, modified to be able to fit into a 32-bit integer.

SCurve3 ( double a ) : double

Returns the given value mapped onto a cubic S-curve. @a a should range from 0.0 to 1.0. The derivitive of a cubic S-curve is zero at @a a = 0.0 and @a a = 1.0

SCurve5 ( double a ) : double

Returns the given value mapped onto a quintic S-curve. @a a should range from 0.0 to 1.0. The first derivitive of a quintic S-curve is zero at @a a = 0.0 and @a a = 1.0 The second derivitive of a quintic S-curve is zero at @a a = 0.0 and @a a = 1.0

SwapValues ( double &a, double &b ) : void

Swaps the values contained by the two given variables.

ValueCoherentNoise ( double x, double y, double z, int seed, NoiseQuality noiseQuality ) : double
ValueNoise ( int x, int y, int z ) : double
ValueNoise ( int x, int y, int z, int seed ) : double

Описание методов

ClampValue() публичный статический Метод

public static ClampValue ( double value, double lowerBound, double upperBound ) : double
value double
lowerBound double
upperBound double
Результат double

ClampValue() публичный статический Метод

Returns the given value clamped between the given lower and upper bounds. - @a value if @a value lies between @a lowerBound and @a upperBound. - @a lowerBound if @a value is less than @a lowerBound. - @a upperBound if @a value is greater than @a upperBound.
public static ClampValue ( int value, int lowerBound, int upperBound ) : int
value int
lowerBound int
upperBound int
Результат int

CubicInterpolate() публичный статический Метод

Returns the cubic interpolation of two values bound between two other values.
public static CubicInterpolate ( double n0, double n1, double n2, double n3, double a ) : double
n0 double The value before the first value.
n1 double The first value.
n2 double The second value.
n3 double The value after the second value.
a double The alpha value.
Результат double

GetLarger() публичный статический Метод

Returns the larger of the two given numbers.
public static GetLarger ( double a, double b ) : double
a double
b double
Результат double

GetSmaller() публичный статический Метод

Returns the smaller of the two given numbers.
public static GetSmaller ( double a, double b ) : double
a double
b double
Результат double

GradientCoherentNoise() публичный статический Метод

public static GradientCoherentNoise ( double x, double y, double z, int seed, NoiseQuality noiseQuality ) : double
x double
y double
z double
seed int
noiseQuality NoiseQuality
Результат double

GradientNoise() публичный статический Метод

public static GradientNoise ( double fx, double fy, double fz, int ix, int iy, int iz, long seed ) : double
fx double
fy double
fz double
ix int
iy int
iz int
seed long
Результат double

IntValueNoise() публичный статический Метод

public static IntValueNoise ( int x, int y, int z, int seed ) : int
x int
y int
z int
seed int
Результат int

LatLonToXYZ() публичный статический Метод

Provides the X, Y, and Z coordinates on the surface of a sphere cooresponding to the given latitude and longitude.
public static LatLonToXYZ ( double lat, double lon, double &x, double &y, double &z ) : void
lat double
lon double
x double
y double
z double
Результат void

LinearInterpolate() публичный статический Метод

Returns the linear interpolation of two values with the given alpha.
public static LinearInterpolate ( double n0, double n1, double a ) : double
n0 double
n1 double
a double
Результат double

MakeInt32Range() публичный статический Метод

Returns the given value, modified to be able to fit into a 32-bit integer.
public static MakeInt32Range ( double n ) : double
n double
Результат double

SCurve3() публичный статический Метод

Returns the given value mapped onto a cubic S-curve. @a a should range from 0.0 to 1.0. The derivitive of a cubic S-curve is zero at @a a = 0.0 and @a a = 1.0
public static SCurve3 ( double a ) : double
a double
Результат double

SCurve5() публичный статический Метод

Returns the given value mapped onto a quintic S-curve. @a a should range from 0.0 to 1.0. The first derivitive of a quintic S-curve is zero at @a a = 0.0 and @a a = 1.0 The second derivitive of a quintic S-curve is zero at @a a = 0.0 and @a a = 1.0
public static SCurve5 ( double a ) : double
a double
Результат double

SwapValues() публичный статический Метод

Swaps the values contained by the two given variables.
public static SwapValues ( double &a, double &b ) : void
a double
b double
Результат void

ValueCoherentNoise() публичный статический Метод

public static ValueCoherentNoise ( double x, double y, double z, int seed, NoiseQuality noiseQuality ) : double
x double
y double
z double
seed int
noiseQuality NoiseQuality
Результат double

ValueNoise() публичный статический Метод

public static ValueNoise ( int x, int y, int z ) : double
x int
y int
z int
Результат double

ValueNoise() публичный статический Метод

public static ValueNoise ( int x, int y, int z, int seed ) : double
x int
y int
z int
seed int
Результат double

Описание свойств

DEG_TO_RAD публичное статическое свойство

public static double DEG_TO_RAD
Результат double

PI публичное статическое свойство

public static double PI
Результат double

RAD_TO_DEG публичное статическое свойство

public static double RAD_TO_DEG
Результат double

Sqrt2 публичное статическое свойство

public static double Sqrt2
Результат double

Sqrt3 публичное статическое свойство

public static double Sqrt3
Результат double