C# Класс Sharpex2D.Math.MathHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
Abs ( float value ) : float

Returns the absolute value.

Atan2 ( float x, float y ) : float

Calculates the arctangent.

Barycentric ( float value1, float value2, float value3, float amount1, float amount2 ) : float

Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.

CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float

Performs a Catmull-Rom interpolation using the specified positions.

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

Restricts a value to be within a specified range.

Cos ( float value ) : float

Returns the cosinus for the specified value.

Distance ( float value1, float value2 ) : float

Calculates the absolute value of the difference of two values.

Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float

Performs a Hermite spline interpolation.

Lerp ( float value1, float value2, float amount ) : float

Linearly interpolates between two values.

Max ( float value1, float value2 ) : float

Returns the greater of two values.

Min ( float value1, float value2 ) : float

Returns the lesser of two values.

Pow ( float basis, float exponent ) : float

Calculates x raised to the power of y.

Round ( float value ) : float

Rounds the specified value.

Sin ( float value ) : float

Returns the sinus for the specified value.

SmoothStep ( float value1, float value2, float amount ) : float

Interpolates between two values using a cubic equation.

Sqrt ( float value ) : float

Returns the square root for the specified value.

ToAngle ( Vector2 vector ) : float

Calculates an angle out of given coordinates.

ToAngle ( float x, float y ) : float

Calculates an angle out of given coordinates.

ToDegrees ( float radians ) : float

Converts radians to degrees.

ToRadians ( float degrees ) : float

Converts degrees to radians.

ToVector ( float angle ) : Vector2

Converts an angle to a direction vector.

WrapAngle ( float angle ) : float

Reduces a given angle to a value between π and -π.

Описание методов

Abs() публичный статический Метод

Returns the absolute value.
public static Abs ( float value ) : float
value float The value.
Результат float

Atan2() публичный статический Метод

Calculates the arctangent.
public static Atan2 ( float x, float y ) : float
x float The X.
y float The Y.
Результат float

Barycentric() публичный статический Метод

Returns the Cartesian coordinate for one axis of a point that is defined by a given triangle and two normalized barycentric (areal) coordinates.
public static Barycentric ( float value1, float value2, float value3, float amount1, float amount2 ) : float
value1 float The value1.
value2 float The value2.
value3 float The value3.
amount1 float The amount1.
amount2 float The amount2.
Результат float

CatmullRom() публичный статический Метод

Performs a Catmull-Rom interpolation using the specified positions.
public static CatmullRom ( float value1, float value2, float value3, float value4, float amount ) : float
value1 float The value1.
value2 float The value2.
value3 float The value3.
value4 float The value4.
amount float The amount.
Результат float

Clamp() публичный статический Метод

Restricts a value to be within a specified range.
public static Clamp ( float value, float min, float max ) : float
value float The value.
min float The minimum.
max float The maximum.
Результат float

Cos() публичный статический Метод

Returns the cosinus for the specified value.
public static Cos ( float value ) : float
value float The value.
Результат float

Distance() публичный статический Метод

Calculates the absolute value of the difference of two values.
public static Distance ( float value1, float value2 ) : float
value1 float The value1.
value2 float The value2.
Результат float

Hermite() публичный статический Метод

Performs a Hermite spline interpolation.
public static Hermite ( float value1, float tangent1, float value2, float tangent2, float amount ) : float
value1 float The value1.
tangent1 float The tangent1.
value2 float The value2.
tangent2 float The tangent2.
amount float The amount.
Результат float

Lerp() публичный статический Метод

Linearly interpolates between two values.
public static Lerp ( float value1, float value2, float amount ) : float
value1 float The value1.
value2 float The value2.
amount float The amount.
Результат float

Max() публичный статический Метод

Returns the greater of two values.
public static Max ( float value1, float value2 ) : float
value1 float The value1.
value2 float The value2.
Результат float

Min() публичный статический Метод

Returns the lesser of two values.
public static Min ( float value1, float value2 ) : float
value1 float The value1.
value2 float The value2.
Результат float

Pow() публичный статический Метод

Calculates x raised to the power of y.
public static Pow ( float basis, float exponent ) : float
basis float The Basis.
exponent float The Exponent.
Результат float

Round() публичный статический Метод

Rounds the specified value.
public static Round ( float value ) : float
value float The value.
Результат float

Sin() публичный статический Метод

Returns the sinus for the specified value.
public static Sin ( float value ) : float
value float The value.
Результат float

SmoothStep() публичный статический Метод

Interpolates between two values using a cubic equation.
public static SmoothStep ( float value1, float value2, float amount ) : float
value1 float The value1.
value2 float The value2.
amount float The amount.
Результат float

Sqrt() публичный статический Метод

Returns the square root for the specified value.
public static Sqrt ( float value ) : float
value float The value.
Результат float

ToAngle() публичный статический Метод

Calculates an angle out of given coordinates.
public static ToAngle ( Vector2 vector ) : float
vector Vector2 The vector.
Результат float

ToAngle() публичный статический Метод

Calculates an angle out of given coordinates.
public static ToAngle ( float x, float y ) : float
x float The x.
y float The y.
Результат float

ToDegrees() публичный статический Метод

Converts radians to degrees.
public static ToDegrees ( float radians ) : float
radians float The radians.
Результат float

ToRadians() публичный статический Метод

Converts degrees to radians.
public static ToRadians ( float degrees ) : float
degrees float The degrees.
Результат float

ToVector() публичный статический Метод

Converts an angle to a direction vector.
public static ToVector ( float angle ) : Vector2
angle float The angle.
Результат Vector2

WrapAngle() публичный статический Метод

Reduces a given angle to a value between π and -π.
public static WrapAngle ( float angle ) : float
angle float The angle.
Результат float