C# Class ThoNohT.NohBoard.Extra.Geom

A class containing geomitry related functionality.
Afficher le fichier Open project: ThoNohT/NohBoard

Méthodes publiques

Méthode Description
CircleToRectangle ( TPoint center, int radius ) : Rectangle

Converts the parameters for a circle to a rectangle containing the circle.

CircularTranslate ( this start, int distance, float angle ) : TPoint

Translates a point according the circular definition of a distance.

GetAngle ( this speed ) : float

Returns the angle in radians of a speed with two directional components.

GetLength ( this speed ) : float

Returns the length of a speed with two directional components.

RadToDeg ( float rad ) : float

Converts radians to degrees.

ToOrigin ( this rect ) : Rectangle

Returns a new rectangle that is translated to the origin.

Method Details

CircleToRectangle() public static méthode

Converts the parameters for a circle to a rectangle containing the circle.
public static CircleToRectangle ( TPoint center, int radius ) : Rectangle
center TPoint The center of the circle.
radius int The radius of the circle.
Résultat System.Drawing.Rectangle

CircularTranslate() public static méthode

Translates a point according the circular definition of a distance.
public static CircularTranslate ( this start, int distance, float angle ) : TPoint
start this The point to translate.
distance int The distance to translate the point.
angle float The angle to translate the point at.
Résultat TPoint

GetAngle() public static méthode

Returns the angle in radians of a speed with two directional components.
public static GetAngle ( this speed ) : float
speed this The speed.
Résultat float

GetLength() public static méthode

Returns the length of a speed with two directional components.
public static GetLength ( this speed ) : float
speed this The speed.
Résultat float

RadToDeg() public static méthode

Converts radians to degrees.
public static RadToDeg ( float rad ) : float
rad float The angle in radians.
Résultat float

ToOrigin() public static méthode

Returns a new rectangle that is translated to the origin.
public static ToOrigin ( this rect ) : Rectangle
rect this The rectangle to translate.
Résultat System.Drawing.Rectangle