C# 클래스 PixelFarm.VectorMath.MathHelper

Contains common mathematical functions and constants.
파일 보기 프로젝트 열기: prepare/HTML-Renderer

공개 메소드들

메소드 설명
AlmostEqual ( double a, double b, double differenceAllowed ) : bool
BinomialCoefficient ( int n, int k ) : long

Calculates the binomial coefficient n above k.

DegreesToRadians ( double degrees ) : double

Convert degrees to radians

Factorial ( int n ) : long

Calculates the factorial of a given natural number.

GetDeltaAngle ( double StartAngle, double EndAngle ) : double
NextPowerOfTwo ( double n ) : double

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

NextPowerOfTwo ( float n ) : float

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

NextPowerOfTwo ( int n ) : int

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

NextPowerOfTwo ( long n ) : long

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

RadiansToDegrees ( double radians ) : double

Convert radians to degrees

Range0ToTau ( double Value ) : double
Swap ( double &a, double &b ) : void

Swaps two double values.

Swap ( float &a, float &b ) : void

Swaps two float values.

메소드 상세

AlmostEqual() 공개 정적인 메소드

public static AlmostEqual ( double a, double b, double differenceAllowed ) : bool
a double
b double
differenceAllowed double
리턴 bool

BinomialCoefficient() 공개 정적인 메소드

Calculates the binomial coefficient n above k.
public static BinomialCoefficient ( int n, int k ) : long
n int The n.
k int The k.
리턴 long

DegreesToRadians() 공개 정적인 메소드

Convert degrees to radians
public static DegreesToRadians ( double degrees ) : double
degrees double An angle in degrees
리턴 double

Factorial() 공개 정적인 메소드

Calculates the factorial of a given natural number.
public static Factorial ( int n ) : long
n int The number.
리턴 long

GetDeltaAngle() 정적인 공개 메소드

static public GetDeltaAngle ( double StartAngle, double EndAngle ) : double
StartAngle double
EndAngle double
리턴 double

NextPowerOfTwo() 공개 정적인 메소드

Returns the next power of two that is larger than the specified number.
public static NextPowerOfTwo ( double n ) : double
n double The specified number.
리턴 double

NextPowerOfTwo() 공개 정적인 메소드

Returns the next power of two that is larger than the specified number.
public static NextPowerOfTwo ( float n ) : float
n float The specified number.
리턴 float

NextPowerOfTwo() 공개 정적인 메소드

Returns the next power of two that is larger than the specified number.
public static NextPowerOfTwo ( int n ) : int
n int The specified number.
리턴 int

NextPowerOfTwo() 공개 정적인 메소드

Returns the next power of two that is larger than the specified number.
public static NextPowerOfTwo ( long n ) : long
n long The specified number.
리턴 long

RadiansToDegrees() 공개 정적인 메소드

Convert radians to degrees
public static RadiansToDegrees ( double radians ) : double
radians double An angle in radians
리턴 double

Range0ToTau() 정적인 공개 메소드

static public Range0ToTau ( double Value ) : double
Value double
리턴 double

Swap() 공개 정적인 메소드

Swaps two double values.
public static Swap ( double &a, double &b ) : void
a double The first value.
b double The second value.
리턴 void

Swap() 공개 정적인 메소드

Swaps two float values.
public static Swap ( float &a, float &b ) : void
a float The first value.
b float The second value.
리턴 void