C# Class RVO.RVOMath

Contains functions and constants used in multiple classes. *
Datei anzeigen Open project: snape/RVO2-CS Class Usage Examples

Public Methods

Method Description
abs ( Vector2 vector ) : float

Computes the length of a specified two-dimensional vector. *

absSq ( Vector2 vector ) : float

Computes the squared length of a specified two-dimensional * vector.

normalize ( Vector2 vector ) : Vector2

Computes the normalization of the specified two-dimensional * vector.

Private Methods

Method Description
det ( Vector2 vector1, Vector2 vector2 ) : float

Computes the determinant of a two-dimensional square matrix * with rows consisting of the specified two-dimensional vectors. *

distSqPointLineSegment ( Vector2 vector1, Vector2 vector2, Vector2 vector3 ) : float

Computes the squared distance from a line segment with the * specified endpoints to a specified point.

fabs ( float scalar ) : float

Computes the absolute value of a float.

leftOf ( Vector2 a, Vector2 b, Vector2 c ) : float

Computes the signed distance from a line connecting the * specified points to a specified point.

sqr ( float scalar ) : float

Computes the square of a float.

sqrt ( float scalar ) : float

Computes the square root of a float.

Method Details

abs() public static method

Computes the length of a specified two-dimensional vector. *
public static abs ( Vector2 vector ) : float
vector Vector2 The two-dimensional vector whose length is to be * computed.
return float

absSq() public static method

Computes the squared length of a specified two-dimensional * vector.
public static absSq ( Vector2 vector ) : float
vector Vector2 The two-dimensional vector whose squared length * is to be computed.
return float

normalize() public static method

Computes the normalization of the specified two-dimensional * vector.
public static normalize ( Vector2 vector ) : Vector2
vector Vector2 The two-dimensional vector whose normalization * is to be computed.
return Vector2