C# Класс GameMath.Angle

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

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

Метод Описание
Acos ( float x ) : float

Inverse of the cos function. Returns the angle whose cosine is the specified number, in radians.

Asin ( float x ) : float

Inverse of the sin function. Returns the angle whose sine is the specified number, in radians.

Atan ( float x ) : float

Inverse of the tan function. Returns the angle whose tangent is the specified number, in radians.

Atan2 ( float y, float x ) : float

Returns the angle whose tangent is the quotient of two specified numbers, in radians.

Between ( Vector2F v, Vector2F w ) : float

Returns the angle between the specified vectors in radians.

See http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm for details.

Cos ( float x ) : float

Returns the cosine of the specified angle in radians.

Cosh ( float x ) : float

Returns the hyperbolic cosine of the specified angle in radians.

DegreesToRadians ( float degrees ) : float

Converts the specified angle in degrees to radians.

Delta ( float x, float y ) : float

Shortest difference between the specified angles in radians. Think of this as "how do get from angle y to x". Example: Delta(3/2 Pi, 0) will return -1/2 Pi.

See http://stackoverflow.com/questions/1878907/the-smallest-difference-between-2-angles and http://stackoverflow.com/users/503402/max for details.

FromVector ( Vector2F v ) : float

Returns the angle between the specified vector and the x-axis. Example: FromVector(0.5, 0.5) will return DegreesToRadians(45).

See http://stackoverflow.com/questions/6247153/angle-from-2d-unit-vector for details.

RadiansToDegrees ( float degrees ) : float

Converts the specified angle in radians to degrees.

Sin ( float x ) : float

Returns the sine of the specified angle in radians.

Sinh ( float x ) : float

Returns the hyperbolic sine of the specified angle in radians.

Tan ( float x ) : float

Returns the tangent of the specified angle in radians.

Tanh ( float x ) : float

Returns the hyperbolic tangent of the specified angle in radians.

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

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

Inverse of the cos function. Returns the angle whose cosine is the specified number, in radians.
public static Acos ( float x ) : float
x float Number to get the acos of.
Результат float

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

Inverse of the sin function. Returns the angle whose sine is the specified number, in radians.
public static Asin ( float x ) : float
x float Number to get the asin of.
Результат float

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

Inverse of the tan function. Returns the angle whose tangent is the specified number, in radians.
public static Atan ( float x ) : float
x float Number to get the atan of.
Результат float

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

Returns the angle whose tangent is the quotient of two specified numbers, in radians.
public static Atan2 ( float y, float x ) : float
y float Dividend.
x float Divisor.
Результат float

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

Returns the angle between the specified vectors in radians.
See http://www.euclideanspace.com/maths/algebra/vectors/angleBetween/index.htm for details.
public static Between ( Vector2F v, Vector2F w ) : float
v Vector2F First vector.
w Vector2F Second vector.
Результат float

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

Returns the cosine of the specified angle in radians.
public static Cos ( float x ) : float
x float Angle to get the cosine of.
Результат float

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

Returns the hyperbolic cosine of the specified angle in radians.
public static Cosh ( float x ) : float
x float Angle to get the hyperbolic cosine of.
Результат float

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

Converts the specified angle in degrees to radians.
public static DegreesToRadians ( float degrees ) : float
degrees float /// Degrees to convert to radians. ///
Результат float

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

Shortest difference between the specified angles in radians. Think of this as "how do get from angle y to x". Example: Delta(3/2 Pi, 0) will return -1/2 Pi.
See http://stackoverflow.com/questions/1878907/the-smallest-difference-between-2-angles and http://stackoverflow.com/users/503402/max for details.
public static Delta ( float x, float y ) : float
x float First angle.
y float Second angle.
Результат float

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

Returns the angle between the specified vector and the x-axis. Example: FromVector(0.5, 0.5) will return DegreesToRadians(45).
See http://stackoverflow.com/questions/6247153/angle-from-2d-unit-vector for details.
public static FromVector ( Vector2F v ) : float
v Vector2F Vector to get the angle of.
Результат float

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

Converts the specified angle in radians to degrees.
public static RadiansToDegrees ( float degrees ) : float
degrees float /// Radians to convert to degrees. ///
Результат float

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

Returns the sine of the specified angle in radians.
public static Sin ( float x ) : float
x float Angle to get the sine of.
Результат float

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

Returns the hyperbolic sine of the specified angle in radians.
public static Sinh ( float x ) : float
x float Angle to get the hyperbolic sine of.
Результат float

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

Returns the tangent of the specified angle in radians.
public static Tan ( float x ) : float
x float Angle to get the tangent of.
Результат float

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

Returns the hyperbolic tangent of the specified angle in radians.
public static Tanh ( float x ) : float
x float Angle to get the hyperbolic tangent of.
Результат float