MathHelper
Contains common mathematical functions and constants.
方法
BinomialCoefficient(int, int) : long
Calculates the binomial coefficient above .
- n
- The n.
- k
- The k.
返回值: n! / (k! * (n - k)!)
DegreesToRadians(double) : double
Convert degrees to radians
- degrees
- An angle in degrees
返回值: The angle expressed in radians
InverseSqrtFast(double) : double
Returns an approximation of the inverse square root of left number.
- x
- A number.
返回值: 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.
返回值: 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.
返回值: 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.
返回值: 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.
返回值: 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.
返回值: The next power of two.
RadiansToDegrees(double) : double
Convert radians to degrees
- radians
- An angle in radians
返回值: The angle expressed in degrees
字段
ThreePiOver2 : double
Defines the value of Pi multiplied by 3 and divided by two as a Single.