C# 클래스 Fusion.Engine.Graphics.GIS.GlobeMath.DMathUtil

파일 보기 프로젝트 열기: demiurghg/FusionEngine

공개 메소드들

메소드 설명
Clamp ( double value, double min, double max ) : double

Clamps the specified value.

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

Clamps the specified value.

DegreesToRadians ( DVector2 degree ) : DVector2
DegreesToRadians ( double degree ) : double

Converts degrees to radians.

DegreesToRevolutions ( double degree ) : double

Converts degrees to revolutions.

Gauss ( double amplitude, double x, double y, double radX, double radY, double sigmaX, double sigmaY ) : double

Gauss function.

GradiansToDegrees ( double gradian ) : double

Converts gradians to degrees.

GradiansToRadians ( double gradian ) : double

Converts gradians to radians.

GradiansToRevolutions ( double gradian ) : double

Converts gradians to revolutions.

IsOne ( double a ) : bool

Determines whether the specified value is close to one (1.0f).

IsZero ( double a ) : bool

Determines whether the specified value is close to zero (0.0f).

Lerp ( byte from, byte to, double amount ) : byte

Interpolates between two values using a linear function by a given amount.

See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/

Lerp ( double from, double to, double amount ) : double

Interpolates between two values using a linear function by a given amount.

See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/

Mod ( double value, double modulo ) : double

Calculates the modulo of the specified value.

Mod2PI ( double value ) : double

Calculates the modulo 2*PI of the specified value.

NearEqual ( double a, double b ) : bool

Checks if a and b are almost equals, taking into account the magnitude of doubleing point numbers (unlike WithinEpsilon method). See Remarks. See remarks.

The code is using the technique described by Bruce Dawson in Comparing doubleing point numbers 2012 edition.

RadiansToDegrees ( double radian ) : double

Converts radians to degrees.

RadiansToGradians ( double radian ) : double

Converts radians to gradians.

RadiansToRevolutions ( double radian ) : double

Converts radians to revolutions.

RevolutionsToDegrees ( double revolution ) : double

Converts revolutions to degrees.

RevolutionsToGradians ( double revolution ) : double

Converts revolutions to gradians.

RevolutionsToRadians ( double revolution ) : double

Converts revolutions to radians.

SmoothStep ( double amount ) : double

Performs smooth (cubic Hermite) interpolation between 0 and 1.

See https://en.wikipedia.org/wiki/Smoothstep

SmootherStep ( double amount ) : double

Performs a smooth(er) interpolation between 0 and 1 with 1st and 2nd order derivatives of zero at endpoints.

See https://en.wikipedia.org/wiki/Smoothstep

WithinEpsilon ( double a, double b, double epsilon ) : bool

Checks if a - b are almost equals within a double epsilon.

Wrap ( double value, double min, double max ) : double

Wraps the specified value into a range [min, max[

Wrap ( int value, int min, int max ) : int

Wraps the specified value into a range [min, max]

메소드 상세

Clamp() 공개 정적인 메소드

Clamps the specified value.
public static Clamp ( double value, double min, double max ) : double
value double The value.
min double The min.
max double The max.
리턴 double

Clamp() 공개 정적인 메소드

Clamps the specified value.
public static Clamp ( int value, int min, int max ) : int
value int The value.
min int The min.
max int The max.
리턴 int

DegreesToRadians() 공개 정적인 메소드

public static DegreesToRadians ( DVector2 degree ) : DVector2
degree DVector2
리턴 DVector2

DegreesToRadians() 공개 정적인 메소드

Converts degrees to radians.
public static DegreesToRadians ( double degree ) : double
degree double The value to convert.
리턴 double

DegreesToRevolutions() 공개 정적인 메소드

Converts degrees to revolutions.
public static DegreesToRevolutions ( double degree ) : double
degree double The value to convert.
리턴 double

Gauss() 공개 정적인 메소드

Gauss function.
public static Gauss ( double amplitude, double x, double y, double radX, double radY, double sigmaX, double sigmaY ) : double
amplitude double Curve amplitude.
x double Position X.
y double Position Y
radX double Radius X.
radY double Radius Y.
sigmaX double Curve sigma X.
sigmaY double Curve sigma Y.
리턴 double

GradiansToDegrees() 공개 정적인 메소드

Converts gradians to degrees.
public static GradiansToDegrees ( double gradian ) : double
gradian double The value to convert.
리턴 double

GradiansToRadians() 공개 정적인 메소드

Converts gradians to radians.
public static GradiansToRadians ( double gradian ) : double
gradian double The value to convert.
리턴 double

GradiansToRevolutions() 공개 정적인 메소드

Converts gradians to revolutions.
public static GradiansToRevolutions ( double gradian ) : double
gradian double The value to convert.
리턴 double

IsOne() 공개 정적인 메소드

Determines whether the specified value is close to one (1.0f).
public static IsOne ( double a ) : bool
a double The doubleing value.
리턴 bool

IsZero() 공개 정적인 메소드

Determines whether the specified value is close to zero (0.0f).
public static IsZero ( double a ) : bool
a double The doubleing value.
리턴 bool

Lerp() 공개 정적인 메소드

Interpolates between two values using a linear function by a given amount.
See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/
public static Lerp ( byte from, byte to, double amount ) : byte
from byte Value to interpolate from.
to byte Value to interpolate to.
amount double Interpolation amount.
리턴 byte

Lerp() 공개 정적인 메소드

Interpolates between two values using a linear function by a given amount.
See http://www.encyclopediaofmath.org/index.php/Linear_interpolation and http://fgiesen.wordpress.com/2012/08/15/linear-interpolation-past-present-and-future/
public static Lerp ( double from, double to, double amount ) : double
from double Value to interpolate from.
to double Value to interpolate to.
amount double Interpolation amount.
리턴 double

Mod() 공개 정적인 메소드

Calculates the modulo of the specified value.
public static Mod ( double value, double modulo ) : double
value double The value.
modulo double The modulo.
리턴 double

Mod2PI() 공개 정적인 메소드

Calculates the modulo 2*PI of the specified value.
public static Mod2PI ( double value ) : double
value double The value.
리턴 double

NearEqual() 공개 정적인 메소드

Checks if a and b are almost equals, taking into account the magnitude of doubleing point numbers (unlike WithinEpsilon method). See Remarks. See remarks.
The code is using the technique described by Bruce Dawson in Comparing doubleing point numbers 2012 edition.
public static NearEqual ( double a, double b ) : bool
a double The left value to compare.
b double The right value to compare.
리턴 bool

RadiansToDegrees() 공개 정적인 메소드

Converts radians to degrees.
public static RadiansToDegrees ( double radian ) : double
radian double The value to convert.
리턴 double

RadiansToGradians() 공개 정적인 메소드

Converts radians to gradians.
public static RadiansToGradians ( double radian ) : double
radian double The value to convert.
리턴 double

RadiansToRevolutions() 공개 정적인 메소드

Converts radians to revolutions.
public static RadiansToRevolutions ( double radian ) : double
radian double The value to convert.
리턴 double

RevolutionsToDegrees() 공개 정적인 메소드

Converts revolutions to degrees.
public static RevolutionsToDegrees ( double revolution ) : double
revolution double The value to convert.
리턴 double

RevolutionsToGradians() 공개 정적인 메소드

Converts revolutions to gradians.
public static RevolutionsToGradians ( double revolution ) : double
revolution double The value to convert.
리턴 double

RevolutionsToRadians() 공개 정적인 메소드

Converts revolutions to radians.
public static RevolutionsToRadians ( double revolution ) : double
revolution double The value to convert.
리턴 double

SmoothStep() 공개 정적인 메소드

Performs smooth (cubic Hermite) interpolation between 0 and 1.
See https://en.wikipedia.org/wiki/Smoothstep
public static SmoothStep ( double amount ) : double
amount double Value between 0 and 1 indicating interpolation amount.
리턴 double

SmootherStep() 공개 정적인 메소드

Performs a smooth(er) interpolation between 0 and 1 with 1st and 2nd order derivatives of zero at endpoints.
See https://en.wikipedia.org/wiki/Smoothstep
public static SmootherStep ( double amount ) : double
amount double Value between 0 and 1 indicating interpolation amount.
리턴 double

WithinEpsilon() 공개 정적인 메소드

Checks if a - b are almost equals within a double epsilon.
public static WithinEpsilon ( double a, double b, double epsilon ) : bool
a double The left value to compare.
b double The right value to compare.
epsilon double Epsilon value
리턴 bool

Wrap() 공개 정적인 메소드

Wraps the specified value into a range [min, max[
Is thrown when is greater than .
public static Wrap ( double value, double min, double max ) : double
value double The value.
min double The min.
max double The max.
리턴 double

Wrap() 공개 정적인 메소드

Wraps the specified value into a range [min, max]
Is thrown when is greater than .
public static Wrap ( int value, int min, int max ) : int
value int The value to wrap.
min int The min.
max int The max.
리턴 int