Angle
Canonical path: NemAll_Python_Geometry.Angle
Representation class for angle in [rad].
Methods:
-
DegToRad
–Convert degrees to radians
-
FromDeg
–Create an angle from degrees
-
Get
–Get angle as radian value.
-
GetDeg
–Get the angle in degrees
-
Normalize2Pi
–Normalize the angle to a range of <0, 2PI>.
-
NormalizePi
–Normalize the angle to a range of <-PI, PI>.
-
RadToDeg
–Convert radians to degrees
-
RadToGrad
–Convert radians to gradians
-
Set
–Overloaded function. See individual overloads.
-
SetDeg
–Set angle as degree value.
-
__add__
–Overloaded function. See individual overloads.
-
__eq__
–Comparison of angles.
-
__float__
–Convert the angle to a floating point number
-
__iadd__
–In-place addition of two angles
-
__init__
–Overloaded function. See individual overloads.
-
__isub__
–In-place subtraction of two angles
-
__ne__
–Comparison of angles.
-
__repr__
–Convert to string
-
__sub__
–Subtraction of angles.
Attributes:
DegToRad
staticmethod
FromDeg
staticmethod
FromDeg(angleDeg: float) -> Angle
Create an angle from degrees
Parameters:
-
angleDeg
(float
) –Angle in degree
Returns:
-
Angle
–Angle
Examples:
GetDeg
Normalize2Pi
NormalizePi
RadToDeg
staticmethod
RadToGrad
staticmethod
Set
overloaded
SetDeg
Set angle as degree value.
Parameters:
-
angleDeg
(float
) –angle as degree value which will be set.
__add__
overloaded
__add__(angle: float) -> Angle
Addition operator
Parameters:
-
angle
(float
) –Angle as double value which will be added
Returns:
-
Angle
–New angle
__eq__
__eq__(angle: Angle) -> bool
Comparison of angles.
Be careful, this method work without tolerance!
Parameters:
-
angle
(Angle
) –angle to be compared.
Returns:
-
bool
–True when angles are equal, otherwise false.
__float__
__iadd__
__init__
overloaded
Initialize
__init__(angle: Angle)
Constructor.
Initialize angle from single value
Parameters:
-
angle
(float
) –Angle.