MathHelper
Contains common mathematical functions and constants.
Methoden
BinomialCoefficient(int, int) : long
Calculates the binomial coefficient above .
- n
- The n.
- k
- The k.
Rückgabe: n! / (k! * (n - k)!)
DegreesToRadians(double) : double
Convert degrees to radians
- degrees
- An angle in degrees
Rückgabe: The angle expressed in radians
Factorial(int) : long
Calculates the factorial of a given natural number.
- n
- The number.
Rückgabe: n!
InverseSqrtFast(double) : double
Returns an approximation of the inverse square root of left number.
- x
- A number.
Rückgabe: An approximation of the inverse square root of the specified number, with an upper error bound of 0.001
InverseSqrtFast(float) : double
Returns an approximation of the inverse square root of left number.
- x
- A number.
Rückgabe: An approximation of the inverse square root of the specified number, with an upper error bound of 0.001
NextPowerOfTwo(long) : double
Returns the next power of two that is larger than the specified number.
- n
- The specified number.
Rückgabe: The next power of two.
NextPowerOfTwo(double) : double
Returns the next power of two that is larger than the specified number.
- n
- The specified number.
Rückgabe: The next power of two.
NextPowerOfTwo(float) : double
Returns the next power of two that is larger than the specified number.
- n
- The specified number.
Rückgabe: The next power of two.
NextPowerOfTwo(int) : double
Returns the next power of two that is larger than the specified number.
- n
- The specified number.
Rückgabe: The next power of two.
RadiansToDegrees(double) : double
Convert radians to degrees
- radians
- An angle in radians
Rückgabe: The angle expressed in degrees
Felder
ThreePiOver2 : double
Defines the value of Pi multiplied by 3 and divided by two as a Single.