AtomicNET : AtomicEngine Namespace

MathHelper Class

Contains common mathematical functions and constants.

Syntax

public static class MathHelper

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Members

See Also: Inherited members from object.

Public Fields

static readonly
DTORF float . Documentation for this section has not yet been entered.
const
E float (2.718282). Defines the value of E as a float.
const
Log10E float (0.4342945). Defines the base-10 logarithm of E.
const
Log2E float (1.442695). Defines the base-2 logarithm of E.
const
Pi float (3.141593). Defines the value of Pi as a float.
const
PiOver2 float (1.570796). Defines the value of Pi divided by two as a float.
const
PiOver3 float (1.047198). Defines the value of Pi divided by three as a float.
const
PiOver4 float (0.7853982). Definesthe value of Pi divided by four as a float.
const
PiOver6 float (0.5235988). Defines the value of Pi divided by six as a float.
const
ThreePiOver2 float (4.712389). Defines the value of Pi multiplied by 3 and divided by two as a float.
const
TwoPi float (6.283185). Defines the value of Pi multiplied by two as a float.

Public Methods

static
BinomialCoefficient (int, int) : long
Calculates the binomial coefficient n above k.
static
CatmullRom (float, float, float, float, float) : float
Documentation for this section has not yet been entered.
static
Clamp (float, float, float) : float
Clamp a float to a range.
static
DegreesToRadians (double) : double
Convert degrees to radians
static
DegreesToRadians (float) : float
Convert degrees to radians
static
Factorial (int) : long
Calculates the factorial of a given natural number.
static
InverseSqrtFast (double) : double
Returns an approximation of the inverse square root of left number.
static
InverseSqrtFast (float) : float
Returns an approximation of the inverse square root of left number.
static
Lerp (float, float, float) : float
Documentation for this section has not yet been entered.
static
NextPowerOfTwo (double) : double
Returns the next power of two that is larger than the specified number.
static
NextPowerOfTwo (int) : int
Returns the next power of two that is larger than the specified number.
static
NextPowerOfTwo (long) : long
Returns the next power of two that is larger than the specified number.
static
NextPowerOfTwo (float) : float
Returns the next power of two that is larger than the specified number.
static
RadiansToDegrees (double) : double
Convert radians to degrees
static
RadiansToDegrees (float) : float
Convert radians to degrees
static
Swap (ref double, ref double)
Swaps two double values.
static
Swap (ref float, ref float)
Swaps two float values.
static
WrapAngle (float) : float
Documentation for this section has not yet been entered.

Member Details

BinomialCoefficient Method

Calculates the binomial coefficient n above k.

Syntax

public static long BinomialCoefficient (int n, int k)

Parameters

n
The n.
k
The k.

Returns

n! / (k! * (n - k)!)

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

CatmullRom Method

Documentation for this section has not yet been entered.

Syntax

public static float CatmullRom (float value1, float value2, float value3, float value4, float amount)

Parameters

value1
Documentation for this section has not yet been entered.
value2
Documentation for this section has not yet been entered.
value3
Documentation for this section has not yet been entered.
value4
Documentation for this section has not yet been entered.
amount
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Clamp Method

Clamp a float to a range.

Syntax

public static float Clamp (float value, float min, float max)

Parameters

value
Documentation for this section has not yet been entered.
min
Documentation for this section has not yet been entered.
max
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

DegreesToRadians Method

Convert degrees to radians

Syntax

public static double DegreesToRadians (double degrees)

Parameters

degrees
An angle in degrees

Returns

The angle expressed in radians

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

DegreesToRadians Method

Convert degrees to radians

Syntax

public static float DegreesToRadians (float degrees)

Parameters

degrees
An angle in degrees

Returns

The angle expressed in radians

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

DTORF Field

Documentation for this section has not yet been entered.

Syntax

public static readonly float DTORF

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

E Field

Defines the value of E as a float.

Value: 2.718282

Syntax

public const float E

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Factorial Method

Calculates the factorial of a given natural number.

Syntax

public static long Factorial (int n)

Parameters

n
The number.

Returns

n!

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

InverseSqrtFast Method

Returns an approximation of the inverse square root of left number.

Syntax

public static double InverseSqrtFast (double x)

Parameters

x
A number.

Returns

An approximation of the inverse square root of the specified number, with an upper error bound of 0.001

Remarks

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

InverseSqrtFast Method

Returns an approximation of the inverse square root of left number.

Syntax

public static float InverseSqrtFast (float x)

Parameters

x
A number.

Returns

An approximation of the inverse square root of the specified number, with an upper error bound of 0.001

Remarks

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Lerp Method

Documentation for this section has not yet been entered.

Syntax

public static float Lerp (float lhs, float rhs, float t)

Parameters

lhs
Documentation for this section has not yet been entered.
rhs
Documentation for this section has not yet been entered.
t
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Log10E Field

Defines the base-10 logarithm of E.

Value: 0.4342945

Syntax

public const float Log10E

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Log2E Field

Defines the base-2 logarithm of E.

Value: 1.442695

Syntax

public const float Log2E

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

NextPowerOfTwo Method

Returns the next power of two that is larger than the specified number.

Syntax

public static double NextPowerOfTwo (double n)

Parameters

n
The specified number.

Returns

The next power of two.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

NextPowerOfTwo Method

Returns the next power of two that is larger than the specified number.

Syntax

public static int NextPowerOfTwo (int n)

Parameters

n
The specified number.

Returns

The next power of two.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

NextPowerOfTwo Method

Returns the next power of two that is larger than the specified number.

Syntax

public static long NextPowerOfTwo (long n)

Parameters

n
The specified number.

Returns

The next power of two.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

NextPowerOfTwo Method

Returns the next power of two that is larger than the specified number.

Syntax

public static float NextPowerOfTwo (float n)

Parameters

n
The specified number.

Returns

The next power of two.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Pi Field

Defines the value of Pi as a float.

Value: 3.141593

Syntax

public const float Pi

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PiOver2 Field

Defines the value of Pi divided by two as a float.

Value: 1.570796

Syntax

public const float PiOver2

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PiOver3 Field

Defines the value of Pi divided by three as a float.

Value: 1.047198

Syntax

public const float PiOver3

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PiOver4 Field

Definesthe value of Pi divided by four as a float.

Value: 0.7853982

Syntax

public const float PiOver4

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

PiOver6 Field

Defines the value of Pi divided by six as a float.

Value: 0.5235988

Syntax

public const float PiOver6

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

RadiansToDegrees Method

Convert radians to degrees

Syntax

public static double RadiansToDegrees (double radians)

Parameters

radians
An angle in radians

Returns

The angle expressed in degrees

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

RadiansToDegrees Method

Convert radians to degrees

Syntax

public static float RadiansToDegrees (float radians)

Parameters

radians
An angle in radians

Returns

The angle expressed in degrees

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Swap Method

Swaps two double values.

Syntax

public static void Swap (ref double a, ref double b)

Parameters

a
The first value.
b
The second value.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

Swap Method

Swaps two float values.

Syntax

public static void Swap (ref float a, ref float b)

Parameters

a
The first value.
b
The second value.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

ThreePiOver2 Field

Defines the value of Pi multiplied by 3 and divided by two as a float.

Value: 4.712389

Syntax

public const float ThreePiOver2

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

TwoPi Field

Defines the value of Pi multiplied by two as a float.

Value: 6.283185

Syntax

public const float TwoPi

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0

WrapAngle Method

Documentation for this section has not yet been entered.

Syntax

public static float WrapAngle (float angle)

Parameters

angle
Documentation for this section has not yet been entered.

Returns

Documentation for this section has not yet been entered.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: AtomicEngine
Assembly: AtomicNET (in AtomicNET.dll)
Assembly Versions: 1.0.0.0