MathHelper Methods |
The MathHelper type exposes the following members.
Name | Description | |
---|---|---|
BinomialCoefficient |
Computes the binomial coefficient of (n, k), also read as "n choose k".
| |
Bitmask |
Creates the smallest bitmask that is greater than or equal to the given value.
| |
ClampT |
Clamps the specified value.
| |
Frac(Double) |
Calculates the fractional part of a specified double-precision floating-point number.
| |
Frac(Single) |
Calculates the fractional part of a specified single-precision floating-point number.
| |
Gaussian(Double, Double, Double, Double) |
Computes the Gaussian function y = k * e^( -(x-μ)2/(2σ2)
(double-precision).
| |
Gaussian(Single, Single, Single, Single) |
Computes the Gaussian function y = k * e^( -(x-μ)2/(2σ2)
(single precision).
| |
Hypotenuse(Double, Double) |
Computes Sqrt(a*a + b*b) without underflow/overflow (double-precision).
| |
Hypotenuse(Single, Single) |
Computes Sqrt(a*a + b*b) without underflow/overflow (single-precision).
| |
IsPowerOf2 |
Determines whether the specified value is a power of two.
| |
Log2GreaterOrEqual |
Returns the smallest non-negative integer x such that 2x ≥ value.
| |
Log2LessOrEqual |
Returns the largest non-negative integer x such that 2x ≤ value.
| |
NextPowerOf2 |
Returns the smallest power of two that is greater than the given value.
| |
SwapT |
Swaps the content of two variables.
| |
ToDegrees(Double) |
Converts an angle value from radians to degrees (double-precision).
| |
ToDegrees(Single) |
Converts an angle value from radians to degrees (single-precision).
| |
ToRadians(Double) |
Converts an angle value from degrees to radians (double-precision).
| |
ToRadians(Single) |
Converts an angle value from degrees to radians (single-precision).
|