CVBpy 14.0
Angle Class Reference

Object for convenient and type-safe handling of angles. More...

Inherits object.

Public Member Functions

cvb.Angle from_degrees (float deg, bool trim=False)
 Create an angle in degrees. More...
 
cvb.Angle from_radians (float rad, bool trim=False)
 Create an angle in radians. More...
 

Properties

 deg = property
 float: Gets or sets the value in degrees.
 
 is_trimmed = property
 bool: Gets or sets trimming of the value of the angle to the range -PI...PI.
 
 rad = property
 float: Gets or sets the value in radians.
 

Detailed Description

Object for convenient and type-safe handling of angles.

Default creates a 0 degree angle.

Parameters

trim : bool Enable trimming of values between -PI...PI.

Member Function Documentation

◆ from_degrees()

cvb.Angle from_degrees ( float  deg,
bool   trim = False 
)

Create an angle in degrees.

Parameters

deg : float Angle value.

trim : bool Enable trimming of values between -PI...PI.

Returns

cvb.Angle A new angle object representing the input value.

◆ from_radians()

cvb.Angle from_radians ( float  rad,
bool   trim = False 
)

Create an angle in radians.

Parameters

rad : float Angle value.

trim : bool Enable trimming of values between -PI...PI.

Returns

cvb.Angle A new angle object representing the input value.