C# 클래스 ThoNohT.NohBoard.Extra.Geom

A class containing geomitry related functionality.
파일 보기 프로젝트 열기: ThoNohT/NohBoard

공개 메소드들

메소드 설명
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