Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
LibNoise.Math Class Reference

Provides math operations not found in System.Math. More...

Inheritance diagram for LibNoise.Math:
LibNoise.FastNoiseBasis LibNoise.GradientNoiseBasis LibNoise.Models.Sphere LibNoise.Modifiers.Blend LibNoise.Modifiers.CurveOutput LibNoise.Modifiers.Select LibNoise.Modifiers.Terrace LibNoise.FastBillow LibNoise.FastNoise LibNoise.FastRidgedMultifractal LibNoise.Billow LibNoise.Perlin LibNoise.RidgedMultifractal

Static Public Member Functions

static int ClampValue (int value, int lowerBound, int upperBound)
 Returns the given value clamped between the given lower and upper bounds. More...
 
static double GetLarger (double a, double b)
 Returns the larger of the two given numbers. More...
 
static double GetSmaller (double a, double b)
 Returns the smaller of the two given numbers. More...
 
static void SwapValues (ref double a, ref double b)
 Swaps the values contained by the two given variables. More...
 

Static Public Attributes

static readonly double DEG_TO_RAD = PI / 180.0
 Returns PI/180.0, used for converting degrees to radians. More...
 
static readonly double PI = 3.1415926535897932385
 Returns the value of the mathematical constant PI. More...
 
static readonly double Sqrt2 = 1.4142135623730950488
 Returns the square root of 2. More...
 
static readonly double Sqrt3 = 1.7320508075688772935
 Returns the square root of 3. More...
 

Protected Member Functions

double CubicInterpolate (double n0, double n1, double n2, double n3, double a)
 Returns the cubic interpolation of two values bound between two other values. More...
 
void LatLonToXYZ (double lat, double lon, ref double x, ref double y, ref double z)
 Provides the X, Y, and Z coordinates on the surface of a sphere cooresponding to the given latitude and longitude. More...
 
double LinearInterpolate (double n0, double n1, double a)
 Returns the linear interpolation of two values with the given alpha. More...
 
double SCurve3 (double a)
 Returns the given value, modified to be able to fit into a 32-bit integer. More...
 
double SCurve5 (double a)
 Returns the given value mapped onto a quintic S-curve. More...
 

Detailed Description

Provides math operations not found in System.Math.

Member Function Documentation

static int LibNoise.Math.ClampValue ( int  value,
int  lowerBound,
int  upperBound 
)
inlinestatic

Returns the given value clamped between the given lower and upper bounds.

double LibNoise.Math.CubicInterpolate ( double  n0,
double  n1,
double  n2,
double  n3,
double  a 
)
inlineprotected

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

Parameters
n0The value before the first value.
n1The first value.
n2The second value.
n3The value after the second value.
aThe alpha value.
Returns
static double LibNoise.Math.GetLarger ( double  a,
double  b 
)
inlinestatic

Returns the larger of the two given numbers.

static double LibNoise.Math.GetSmaller ( double  a,
double  b 
)
inlinestatic

Returns the smaller of the two given numbers.

void LibNoise.Math.LatLonToXYZ ( double  lat,
double  lon,
ref double  x,
ref double  y,
ref double  z 
)
inlineprotected

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

double LibNoise.Math.LinearInterpolate ( double  n0,
double  n1,
double  a 
)
inlineprotected

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

double LibNoise.Math.SCurve3 ( double  a)
inlineprotected

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

Returns the given value mapped onto a cubic S-curve.

double LibNoise.Math.SCurve5 ( double  a)
inlineprotected

Returns the given value mapped onto a quintic S-curve.

static void LibNoise.Math.SwapValues ( ref double  a,
ref double  b 
)
inlinestatic

Swaps the values contained by the two given variables.

Member Data Documentation

readonly double LibNoise.Math.DEG_TO_RAD = PI / 180.0
static

Returns PI/180.0, used for converting degrees to radians.

readonly double LibNoise.Math.PI = 3.1415926535897932385
static

Returns the value of the mathematical constant PI.

readonly double LibNoise.Math.Sqrt2 = 1.4142135623730950488
static

Returns the square root of 2.

readonly double LibNoise.Math.Sqrt3 = 1.7320508075688772935
static

Returns the square root of 3.


The documentation for this class was generated from the following file: