Control Libraries 6.3.4
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
state_representation::units::Angle Class Reference

Public Member Functions

constexpr Angle (long double n=0.0)
 Constructor with a value in radian in [-pi,pi]. More...
 
constexpr Angle (const Angle &ang)
 Copy constructor from another Angle. More...
 
constexpr long double get_value () const
 Getter of the value attribute. More...
 
constexpr Angleoperator= (long double n)
 Overload the = operator. More...
 
constexpr Angleoperator- ()
 Overload the - operator. More...
 
constexpr Angleoperator+= (const Angle &rhs)
 Overload the += operator. More...
 
constexpr Angle operator+ (const Angle &rhs) const
 Overload the + operator. More...
 
constexpr Angleoperator-= (const Angle &rhs)
 Overload the -= operator. More...
 
constexpr Angle operator- (const Angle &rhs) const
 Overload the - operator. More...
 
constexpr Angleoperator*= (double lambda)
 Overload the *= operator with a scalar. More...
 
constexpr Angle operator* (double lambda) const
 Overload the * operator with a scalar. More...
 
constexpr Angleoperator/= (double lambda)
 Overload the /= operator with a scalar. More...
 
constexpr Angle operator/ (double lambda) const
 Overload the / operator with a scalar. More...
 
constexpr bool operator== (const Angle &rhs) const
 Overload the == operator. More...
 
constexpr bool operator!= (const Angle &rhs) const
 Overload the != operator. More...
 
constexpr bool operator> (const Angle &rhs) const
 Overload the > operator. More...
 
constexpr bool operator>= (const Angle &rhs) const
 Overload the > operator. More...
 
constexpr bool operator< (const Angle &rhs) const
 Overload the < operator. More...
 
constexpr bool operator<= (const Angle &rhs) const
 Overload the < operator. More...
 

Friends

constexpr double operator/ (const Angle &lhs, const Angle &rhs)
 Overload the / operator between two Angles. More...
 
constexpr Angle operator* (double lambda, const Angle &rhs)
 Overload the / operator with a scalar on the left side. More...
 
constexpr Angle literals::operator""_rad (long double n)
 Literal operator to create an Angle in radian. More...
 
constexpr Angle literals::operator""_deg (long double n)
 Literal operator to create an Angle in degrees. More...
 

Detailed Description

Definition at line 24 of file Angle.hpp.

Constructor & Destructor Documentation

◆ Angle() [1/2]

constexpr state_representation::units::Angle::Angle ( long double  n = 0.0)
constexpr

Constructor with a value in radian in [-pi,pi].

Parameters
nthe value in radian

Definition at line 188 of file Angle.hpp.

◆ Angle() [2/2]

constexpr state_representation::units::Angle::Angle ( const Angle ang)
constexpr

Copy constructor from another Angle.

Parameters
angthe Angle to copy

Definition at line 191 of file Angle.hpp.

Member Function Documentation

◆ get_value()

constexpr long double state_representation::units::Angle::get_value ( ) const
constexpr

Getter of the value attribute.

Returns
the value in radian

Definition at line 194 of file Angle.hpp.

◆ operator!=()

constexpr bool state_representation::units::Angle::operator!= ( const Angle rhs) const
constexpr

Overload the != operator.

Parameters
rhsthe other Angle to check inequality with
Returns
bool true if the two Angles are different

Definition at line 260 of file Angle.hpp.

◆ operator*()

constexpr Angle state_representation::units::Angle::operator* ( double  lambda) const
constexpr

Overload the * operator with a scalar.

Parameters
lambdathe scalar to multiply with
Returns
the Angle multiply by lambda

Definition at line 238 of file Angle.hpp.

◆ operator*=()

constexpr Angle & state_representation::units::Angle::operator*= ( double  lambda)
constexpr

Overload the *= operator with a scalar.

Parameters
lambdathe scalar to multiply with
Returns
the Angle multiply by lambda

Definition at line 232 of file Angle.hpp.

◆ operator+()

constexpr Angle state_representation::units::Angle::operator+ ( const Angle rhs) const
constexpr

Overload the + operator.

Parameters
rhsAngle to add
Returns
the current Angle added the Angle given in argument

Definition at line 214 of file Angle.hpp.

◆ operator+=()

constexpr Angle & state_representation::units::Angle::operator+= ( const Angle rhs)
constexpr

Overload the += operator.

Parameters
rhsAngle to add
Returns
the current Angle added the Angle given in argument

Definition at line 208 of file Angle.hpp.

◆ operator-() [1/2]

constexpr Angle & state_representation::units::Angle::operator- ( )
constexpr

Overload the - operator.

Returns
the negative angle in radian

Definition at line 203 of file Angle.hpp.

◆ operator-() [2/2]

constexpr Angle state_representation::units::Angle::operator- ( const Angle rhs) const
constexpr

Overload the - operator.

Parameters
rhsAngle to subtract
Returns
the current Angle minus the Angle given in argument

Definition at line 226 of file Angle.hpp.

◆ operator-=()

constexpr Angle & state_representation::units::Angle::operator-= ( const Angle rhs)
constexpr

Overload the -= operator.

Parameters
rhsAngle to subtract
Returns
the current Angle minus the Angle given in argument

Definition at line 220 of file Angle.hpp.

◆ operator/()

constexpr Angle state_representation::units::Angle::operator/ ( double  lambda) const
constexpr

Overload the / operator with a scalar.

Parameters
lambdathe scalar to divide by
Returns
the Angle divided by lambda

Definition at line 250 of file Angle.hpp.

◆ operator/=()

constexpr Angle & state_representation::units::Angle::operator/= ( double  lambda)
constexpr

Overload the /= operator with a scalar.

Parameters
lambdathe scalar to divide by
Returns
the Angle divided by lambda

Definition at line 244 of file Angle.hpp.

◆ operator<()

constexpr bool state_representation::units::Angle::operator< ( const Angle rhs) const
constexpr

Overload the < operator.

Parameters
rhsthe other Angle to check strict inferiority with
Returns
bool true if the current Angle is strictly inferior than provided Angle

Definition at line 272 of file Angle.hpp.

◆ operator<=()

constexpr bool state_representation::units::Angle::operator<= ( const Angle rhs) const
constexpr

Overload the < operator.

Parameters
rhsthe other Angle to check inferiority with
Returns
bool true if the current Angle is inferior than provided Angle

Definition at line 276 of file Angle.hpp.

◆ operator=()

constexpr Angle & state_representation::units::Angle::operator= ( long double  n)
constexpr

Overload the = operator.

Parameters
nthe angle value to assign in radian
Returns
the angle in radian

Definition at line 198 of file Angle.hpp.

◆ operator==()

constexpr bool state_representation::units::Angle::operator== ( const Angle rhs) const
constexpr

Overload the == operator.

Parameters
rhsthe other Angle to check equality with
Returns
bool true if the two Angles are equal

Definition at line 256 of file Angle.hpp.

◆ operator>()

constexpr bool state_representation::units::Angle::operator> ( const Angle rhs) const
constexpr

Overload the > operator.

Parameters
rhsthe other Angle to check strict superiority with
Returns
bool true if the current Angle is strictly superior than provided Angle

Definition at line 264 of file Angle.hpp.

◆ operator>=()

constexpr bool state_representation::units::Angle::operator>= ( const Angle rhs) const
constexpr

Overload the > operator.

Parameters
rhsthe other Angle to check superiority with
Returns
bool true if the current Angle is superior than provided Angle

Definition at line 268 of file Angle.hpp.

Friends And Related Function Documentation

◆ literals::operator""_deg

constexpr Angle literals::operator""_deg ( long double  n)
friend

Literal operator to create an Angle in degrees.

Parameters
nthe angle value in degree
theAngle in the base unit (radian)

◆ literals::operator""_rad

constexpr Angle literals::operator""_rad ( long double  n)
friend

Literal operator to create an Angle in radian.

Parameters
nthe angle value in radian
theAngle in the base unit (radian)

◆ operator*

constexpr Angle operator* ( double  lambda,
const Angle rhs 
)
friend

Overload the / operator with a scalar on the left side.

Parameters
lambdathe scalar to multiply with
Returns
the Angle multiply by lambda

Definition at line 284 of file Angle.hpp.

◆ operator/

constexpr double operator/ ( const Angle lhs,
const Angle rhs 
)
friend

Overload the / operator between two Angles.

Parameters
lhsthe first Angle
rhsthe second Angle
Returns
the ratio between first and second Angle

Definition at line 280 of file Angle.hpp.


The documentation for this class was generated from the following file: