C# Class Strilanc.Angle.Basis

Afficher le fichier Open project: Strilanc/Angle Class Usage Examples

Méthodes publiques

Свойство Type Description
Natural Basis

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
Basis ( double origin, double counterClockwiseRadiansPerUnit ) : System

Method Details

AngleToDir() public méthode

Returns the direction corresponding to the given angle in this basis.
public AngleToDir ( double angle ) : Dir
angle double
Résultat Dir

AngleToTurn() public méthode

Returns the turn corresponding to a rotation by the given angle in this basis.
public AngleToTurn ( double angle ) : Turn
angle double
Résultat Turn

DirToSignedAngle() public méthode

Returns the smallest positive or negative angle corresponding to the given direction in this basis.
public DirToSignedAngle ( Dir direction ) : double
direction Dir
Résultat double

DirToUnsignedAngle() public méthode

Returns the smallest non-negative angle corresponding to the given direction in this basis.
public DirToUnsignedAngle ( Dir direction ) : double
direction Dir
Résultat double

FromDirectionAndUnits() public static méthode

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
Résultat Basis

ToString() public méthode

public ToString ( ) : string
Résultat string

TurnToAngle() public méthode

Returns the angle corresponding to a rotation by the given turn in this basis.
public TurnToAngle ( Turn turn ) : double
turn Turn
Résultat double

Property Details

Natural public_oe static_oe property

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
Résultat Basis