MathHelper

StockSharp.Xaml.Charting.Rendering.HighQualityRasterizer.Agg.VectorMath

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

Factorial(int) : long

Calculates the factorial of a given natural number.

n
The number.

Возвращает: n!

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

Swap(double, double)

Swaps two double values.

a
The first value.
b
The second value.
Swap(float, float)

Swaps two float values.

a
The first value.
b
The second value.

Поля

E : double

Defines the value of E as a Single.

Log10E : double

Defines the base-10 logarithm of E.

Log2E : double

Defines the base-2 logarithm of E.

Pi : double

Defines the value of Pi as a Single.

PiOver2 : double

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

PiOver3 : double

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

PiOver4 : double

Definesthe value of Pi divided by four as a Single.

PiOver6 : double

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

ThreePiOver2 : double

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

TwoPi : double

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