C# Класс ThoNohT.NohBoard.Extra.Geom

A class containing geomitry related functionality.
Показать файл Открыть проект

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

Метод Описание
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.

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

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

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.
Результат System.Drawing.Rectangle

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

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.
Результат TPoint

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

Returns the angle in radians of a speed with two directional components.
public static GetAngle ( this speed ) : float
speed this The speed.
Результат float

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

Returns the length of a speed with two directional components.
public static GetLength ( this speed ) : float
speed this The speed.
Результат float

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

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

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

Returns a new rectangle that is translated to the origin.
public static ToOrigin ( this rect ) : Rectangle
rect this The rectangle to translate.
Результат System.Drawing.Rectangle