C# Класс Strilanc.Angle.Basis

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Natural Basis

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

Метод Описание
AngleToDir ( double angle ) : Dir

Returns the direction corresponding to the given angle in this basis.

AngleToTurn ( double angle ) : Turn

Returns the turn corresponding to a rotation by the given angle in this basis.

DirToSignedAngle ( Dir direction ) : double

Returns the smallest positive or negative angle corresponding to the given direction in this basis.

DirToUnsignedAngle ( Dir direction ) : double

Returns the smallest non-negative angle corresponding to the given direction in this basis.

FromDirectionAndUnits ( Dir origin, double unitsPerTurn, bool isClockwisePositive ) : Basis

Returns a basis with a zero angle along the given direction, and units that satisfy the given constraints.

ToString ( ) : string
TurnToAngle ( Turn turn ) : double

Returns the angle corresponding to a rotation by the given turn in this basis.

Приватные методы

Метод Описание
Basis ( double origin, double counterClockwiseRadiansPerUnit ) : System

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

AngleToDir() публичный Метод

Returns the direction corresponding to the given angle in this basis.
public AngleToDir ( double angle ) : Dir
angle double
Результат Dir

AngleToTurn() публичный Метод

Returns the turn corresponding to a rotation by the given angle in this basis.
public AngleToTurn ( double angle ) : Turn
angle double
Результат Turn

DirToSignedAngle() публичный Метод

Returns the smallest positive or negative angle corresponding to the given direction in this basis.
public DirToSignedAngle ( Dir direction ) : double
direction Dir
Результат double

DirToUnsignedAngle() публичный Метод

Returns the smallest non-negative angle corresponding to the given direction in this basis.
public DirToUnsignedAngle ( Dir direction ) : double
direction Dir
Результат double

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

Returns a basis with a zero angle along the given direction, and units that satisfy the given constraints.
public static FromDirectionAndUnits ( Dir origin, double unitsPerTurn, bool isClockwisePositive ) : Basis
origin Dir
unitsPerTurn double
isClockwisePositive bool
Результат Basis

ToString() публичный Метод

public ToString ( ) : string
Результат string

TurnToAngle() публичный Метод

Returns the angle corresponding to a rotation by the given turn in this basis.
public TurnToAngle ( Turn turn ) : double
turn Turn
Результат double

Описание свойств

Natural публичное статическое свойство

Natural angular units. The origin is along the positive X axis. The unit is counter-clockwise radians. For example, angle 0 is along the vector (x:1,y:0) and angle pi/2 is along the vector (x:0, y:1).
public static Basis,Strilanc.Angle Natural
Результат Basis