class Angle

class NemAll_Python_Geometry.Angle

Representation class for angle in [rad].

DegToRad(angleDeg: float) float

Convert angle from deg to rad

Can be used for initialization of Angle class with deg angle.

    angle = Angle(Angle.DegToRad(45));  // angle will be 0.75[rad] (approx.)

Args:

angleDeg:  Angle in deg

Returns:

Angle in rad

FromDeg(angleDeg: float) Angle

Create an Angle from a deg value.

Args:

angleDeg:  Angle in degree

Returns:

Angle

Get() float

Get angle as radian value.

Returns:

double as radian value.

GetDeg() float

Get angle as degree value.

Returns:

double as degree value.

Normalize2Pi() None

Normalize the angle to a range of <0, 2PI>.

This method is checked and set Angle to 0 while angle is out of range <-1e8, 1e8>. The algorithm isn’t stable for angle out of this range.

NormalizePi() None

Normalize the angle to a range of <-PI, PI>.

This method is checked and set Angle to 0 while angle is out of range <-1e8, 1e8>. The algorithm isn’t stable for angle out of this range.

RadToDeg(angleRad: float) float

Convert angle from rad to deg

Args:

angleRad:  Angle in rad

Returns:

Angle in rad

RadToGrad(angleRad: float) float

Convert angle from rad to grad

Args:

angleRad:  Angle in rad

Returns:

Angle in grad

Set(...)
Set(angle: float) None

Set angle as radian value.

Args:

angle:  angle which will be set.

Set(angle: Angle) None

Set angle as radian value.

Args:

angle:  angle which will be set.

SetDeg(angleDeg: float) None

Set angle as degree value.

Args:

angleDeg:  angle as degree value which will be set.

__add__(...)
__add__(angle: Angle) Angle

Addition operator

Args:

angle:  Angle which will be added

Returns:

New angle

__add__(angle: float) Angle

Addition operator

Args:

angle:  Angle as double value which will be added

Returns:

New angle

__eq__(angle: Angle) bool

Comparison of angles without tolerance.

Be careful, this method work without tolerance!

Args:

angle:  Compared angle.

Returns:

True when angles are equal, otherwise false.

__float__() float

Type conversion operator.

Returns:

Angle as double.

__iadd__(angle: Angle) Angle

Addition assignment operator.

Args:

angle:  Angle which will be added.

Returns:

Reference to Angle.

__init__(...)
__init__() None
__init__(angle: Angle) None

Copy constructor.

Args:

angle:  angle which will be copied.

__init__(angle: float) None

Constructor.

Initialize angle from single value

Args:

angle:  Angle.

__isub__(angle: Angle) Angle

Addition assignment operator.

Args:

angle:  Angle which will be added.

Returns:

Reference to Angle.

__ne__(angle: Angle) bool

Comparison of angles without tolerance.

Be careful, this method work without tolerance!

Args:

angle: Compared angle.

Returns:

True when angles are not equal, otherwise false.

__repr__() str

Convert to string

property Deg: float

Get angle as degree value.

Set angle as degree value.

property Rad: float

Get angle as radian value.

Set angle as radian value.

__module__ = 'NemAll_Python_Geometry'