C# 클래스 OpenTK.MathHelper

Contains common mathematical functions and constants.
파일 보기 프로젝트 열기: qualisys/Qualisys-Unity-SDK 1 사용 예제들

공개 메소드들

메소드 설명
BinomialCoefficient ( int n, int k ) : long

Calculates the binomial coefficient n above k.

Clamp ( double n, double min, double max ) : double

Clamps a number between a minimum and a maximum.

Clamp ( float n, float min, float max ) : float

Clamps a number between a minimum and a maximum.

Clamp ( int n, int min, int max ) : int

Clamps a number between a minimum and a maximum.

DegreesToRadians ( double degrees ) : double

Convert degrees to radians

DegreesToRadians ( float degrees ) : float

Convert degrees to radians

Factorial ( int n ) : long

Calculates the factorial of a given natural number.

InverseSqrtFast ( double x ) : double

Returns an approximation of the inverse square root of left number.

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/

InverseSqrtFast ( float x ) : float

Returns an approximation of the inverse square root of left number.

This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/

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

RadiansToDegrees ( float radians ) : float

Convert radians to degrees

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

Swaps two double values.

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

Swaps two float values.

메소드 상세

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

Clamp() 공개 정적인 메소드

Clamps a number between a minimum and a maximum.
public static Clamp ( double n, double min, double max ) : double
n double The number to clamp.
min double The minimum allowed value.
max double The maximum allowed value.
리턴 double

Clamp() 공개 정적인 메소드

Clamps a number between a minimum and a maximum.
public static Clamp ( float n, float min, float max ) : float
n float The number to clamp.
min float The minimum allowed value.
max float The maximum allowed value.
리턴 float

Clamp() 공개 정적인 메소드

Clamps a number between a minimum and a maximum.
public static Clamp ( int n, int min, int max ) : int
n int The number to clamp.
min int The minimum allowed value.
max int The maximum allowed value.
리턴 int

DegreesToRadians() 공개 정적인 메소드

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

DegreesToRadians() 공개 정적인 메소드

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

Factorial() 공개 정적인 메소드

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

InverseSqrtFast() 공개 정적인 메소드

Returns an approximation of the inverse square root of left number.
This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/
public static InverseSqrtFast ( double x ) : double
x double A number.
리턴 double

InverseSqrtFast() 공개 정적인 메소드

Returns an approximation of the inverse square root of left number.
This is an improved implementation of the the method known as Carmack's inverse square root which is found in the Quake III source code. This implementation comes from http://www.codemaestro.com/reviews/review00000105.html. For the history of this method, see http://www.beyond3d.com/content/articles/8/
public static InverseSqrtFast ( float x ) : float
x float A number.
리턴 float

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

RadiansToDegrees() 공개 정적인 메소드

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

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