 CVB++ 14.0
Angle Class Referencefinal

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

`#include <cvb/angle.hpp>`

## Public Member Functions

Angle (bool trim=false) noexcept
Generate a 0° angle. More...

Get the value in radians. More...

Set the value in radians. More...

double Deg () const noexcept
Get the value in degrees. More...

void SetDeg (double deg) noexcept
Set the value in degrees. More...

bool IsTrimmed () const noexcept
Get trimming of the angle's value to the range -PI...PI. More...

void SetIsTrimmed (bool trim) noexcept
Set trimming of the value of the angle to the range -PI...PI. More...

bool operator== (const Angle &angle) const noexcept
Compares to an other angle. More...

bool operator!= (const Angle &angle) const noexcept
Compares to an other angle. More...

bool operator< (const Angle &angle) const noexcept
Compares to an other angle. More...

bool operator<= (const Angle &angle) const noexcept
Compares to an other angle. More...

bool operator> (const Angle &angle) const noexcept
Compares to an other angle. More...

bool operator>= (const Angle &angle) const noexcept
Compares to an other angle. More...

Angleoperator+= (const Angle &angle) noexcept
Adds and assigns to this angle. More...

Angleoperator-= (const Angle &angle) noexcept
Subtracts and assigns to this angle. More...

Angleoperator*= (const double &value) noexcept
Multiplies this angle with the given value. More...

Angleoperator/= (const double &value) noexcept
Divides this angle by the given value. More...

## Static Public Member Functions

static Angle FromDegrees (double deg, bool trim=false) noexcept
Create an angle in degrees. More...

Create an angle in radians. More...

## Related Functions

(Note that these are not member functions.)

Angle operator+ (const Angle &lhs, const Angle &rhs)

Angle operator- (const Angle &lhs, const Angle &rhs)
Subtract two angles. More...

Angle operator/ (const Angle &lhs, const double &rhs)
Divides an angle by a value. More...

Angle operator* (const Angle &lhs, const double &rhs)
Multiplies an angle with a value. More...

Angle operator* (const double &lhs, const Angle &rhs)
Multiplies value with an angle. More...

Angle Abs (Angle angle) noexcept
Absolute value of an angle. More...

Angle Acos (double d) noexcept
Returns the angle whose cosine is the specified number. More...

Angle Asin (double d) noexcept
Returns the angle whose sine is the specified number. More...

Angle Atan (double d) noexcept
Returns the angle whose tangent is the specified number. More...

Angle Atan2 (double y, double x) noexcept
Returns the angle whose tangent is the quotient of two specified numbers. More...

double Cos (Angle angle) noexcept
Returns the cosine of an angle. More...

double Cosh (Angle angle) noexcept
Returns the hyperbolic cosine of an angle. More...

double Sin (Angle angle) noexcept
Returns the sine of an angle. More...

double Sinh (Angle angle) noexcept
Returns the hyperbolic sine of an angle. More...

double Tan (Angle angle) noexcept
Returns the tangent of an angle. More...

double Tanh (Angle angle) noexcept
Returns the hyperbolic tangent of an angle. More...

int Sign (Angle angle) noexcept
Returns a value indicating the sign of an Angle. More...

Angle Max (Angle a, Angle b) noexcept
Returns the bigger of two angles. More...

Angle Min (Angle a, Angle b) noexcept
Returns the smaller of two angles. More...

## Detailed Description

Object for convenient and type - safe handling of angles.

## ◆ Angle()

 Angle ( bool trim = `false` )
inlineexplicitnoexcept

Generate a 0° angle.

Parameters
 [in] trim Enable trimming of values between -PI...PI.
Exceptions
 Does not throw any exception.

## ◆ Deg()

 double Deg ( ) const
inlinenoexcept

Get the value in degrees.

Returns
The value in degrees.
Exceptions
 Does not throw any exception.
Examples
ShapeFinder2/QtShapeFinder2.

## ◆ FromDegrees()

 static Angle FromDegrees ( double deg, bool trim = `false` )
inlinestaticnoexcept

Create an angle in degrees.

Parameters
 [in] deg Angle value. [in] trim Enable trimming of values between -PI...PI.
Returns
New angle object representing the input value.
Exceptions
 Does not throw any exception.

 static Angle FromRadians ( double rad, bool trim = `false` )
inlinestaticnoexcept

Parameters
 [in] rad Angle value. [in] trim Enable trimming of values between -PI...PI.
Returns
New angle object representing the input value.
Exceptions
 Does not throw any exception.

## ◆ IsTrimmed()

 bool IsTrimmed ( ) const
inlinenoexcept

Get trimming of the angle's value to the range -PI...PI.

Returns
True if trimming is on, false otherwise.
Exceptions
 Does not throw any exception.

## ◆ operator!=()

 bool operator!= ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if not equal, otherwise false.
Exceptions
 Does not throw any exception.

## ◆ operator*=()

 Angle & operator*= ( const double & value )
inlinenoexcept

Multiplies this angle with the given value.

Parameters
 [in] value Factor.
Returns
This angle.
Exceptions
 Does not throw any exception.

## ◆ operator+=()

 Angle & operator+= ( const Angle & angle )
inlinenoexcept

Adds and assigns to this angle.

Parameters
 [in] angle Other angle.
Returns
This angle.
Exceptions
 Does not throw any exception.

## ◆ operator-=()

 Angle & operator-= ( const Angle & angle )
inlinenoexcept

Subtracts and assigns to this angle.

Parameters
 [in] angle Other angle.
Returns
This angle.
Exceptions
 Does not throw any exception.

## ◆ operator/=()

 Angle & operator/= ( const double & value )
inlinenoexcept

Divides this angle by the given value.

Parameters
 [in] value Divisor.
Returns
This angle.
Exceptions
 Does not throw any exception.

## ◆ operator<()

 bool operator< ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if this less than the other angle, otherwise false.
Exceptions
 Does not throw any exception.

## ◆ operator<=()

 bool operator<= ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if this less than or equal the other angle, otherwise false.
Exceptions
 Does not throw any exception.

## ◆ operator==()

 bool operator== ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if equal, otherwise false.
Exceptions
 Does not throw any exception.

## ◆ operator>()

 bool operator> ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if this greater than the other angle, otherwise false.
Exceptions
 Does not throw any exception.

## ◆ operator>=()

 bool operator>= ( const Angle & angle ) const
inlinenoexcept

Compares to an other angle.

Parameters
 [in] angle Other angle.
Returns
True if this greater than or equal the other angle, otherwise false.
Exceptions
 Does not throw any exception.

inlinenoexcept

Returns
Exceptions
 Does not throw any exception.

## ◆ SetDeg()

 void SetDeg ( double deg )
inlinenoexcept

Set the value in degrees.

Parameters
 [in] deg New value.
Exceptions
 Does not throw any exception.

## ◆ SetIsTrimmed()

 void SetIsTrimmed ( bool trim )
inlinenoexcept

Set trimming of the value of the angle to the range -PI...PI.

Parameters
 [in] trim True to turn trimming on, false otherwise.
Exceptions
 Does not throw any exception.

inlinenoexcept

Parameters
Exceptions
 Does not throw any exception.

## ◆ Abs()

 Angle Abs ( Angle angle )
related

Absolute value of an angle.

Parameters
 [in] angle The angle.
Returns
Absolute value.
Exceptions
 Does not throw any exception.

## ◆ Acos()

 Angle Acos ( double d )
related

Returns the angle whose cosine is the specified number.

Parameters
 [in] d Cosine.
Returns
Result angle.
Exceptions
 Does not throw any exception.

## ◆ Asin()

 Angle Asin ( double d )
related

Returns the angle whose sine is the specified number.

Parameters
 [in] d Sine.
Returns
Result angle.
Exceptions
 Does not throw any exception.

## ◆ Atan()

 Angle Atan ( double d )
related

Returns the angle whose tangent is the specified number.

Parameters
 [in] d Tangent.
Returns
Result angle.
Exceptions
 Does not throw any exception.

## ◆ Atan2()

 Angle Atan2 ( double y, double x )
related

Returns the angle whose tangent is the quotient of two specified numbers.

Parameters
 [in] y Y parameter. [in] x X parameter.
Returns
Result angle.
Exceptions
 Does not throw any exception.

## ◆ Cos()

 double Cos ( Angle angle )
related

Returns the cosine of an angle.

Parameters
 [in] angle The angle.
Returns
The cosine.
Exceptions
 Does not throw any exception.

## ◆ Cosh()

 double Cosh ( Angle angle )
related

Returns the hyperbolic cosine of an angle.

Parameters
 [in] angle The angle.
Returns
The hyperbolic cosine.
Exceptions
 Does not throw any exception.

## ◆ Max()

 Angle Max ( Angle a, Angle b )
related

Returns the bigger of two angles.

Parameters
 [in] a First angle. [in] b Second angle.
Returns
Biggest angle.
Exceptions
 Does not throw any exception.
Examples
Cvb/CppPointCloudCreateCalibrated.

## ◆ Min()

 Angle Min ( Angle a, Angle b )
related

Returns the smaller of two angles.

Parameters
 [in] a First angle. [in] b Second angle.
Returns
Smallest angle.
Exceptions
 Does not throw any exception.

## ◆ operator*() [1/2]

 Angle operator* ( const Angle & lhs, const double & rhs )
related

Multiplies an angle with a value.

Parameters
 [in] lhs Right hand side angle. [in] rhs Left hand side value.
Returns
The computation result.
Exceptions
 Does not throw any exception.

## ◆ operator*() [2/2]

 Angle operator* ( const double & lhs, const Angle & rhs )
related

Multiplies value with an angle.

Parameters
 [in] lhs Right hand side value. [in] rhs Left hand side angle.
Returns
The computation result.
Exceptions
 Does not throw any exception.

## ◆ operator+()

 Angle operator+ ( const Angle & lhs, const Angle & rhs )
related

Parameters
 [in] lhs Right hand side angle. [in] rhs Left hand side angle.
Returns
The computation result.
Exceptions
 Does not throw any exception.

## ◆ operator-()

 Angle operator- ( const Angle & lhs, const Angle & rhs )
related

Subtract two angles.

Parameters
 [in] lhs Right hand side angle. [in] rhs Left hand side angle.
Returns
The computation result.
Exceptions
 Does not throw any exception.

## ◆ operator/()

 Angle operator/ ( const Angle & lhs, const double & rhs )
related

Divides an angle by a value.

Parameters
 [in] lhs Right hand side angle. [in] rhs Left hand side value.
Returns
The computation result.
Exceptions
 Does not throw any exception.

## ◆ Sign()

 int Sign ( Angle angle )
related

Returns a value indicating the sign of an Angle.

Parameters
 [in] angle The angle.
Returns
-1 if angle is less than zero, 0 if angle is zero, 1 if angle is greater than zero.
Exceptions
 Does not throw any exception.

## ◆ Sin()

 double Sin ( Angle angle )
related

Returns the sine of an angle.

Parameters
 [in] angle The angle.
Returns
The sine.
Exceptions
 Does not throw any exception.

## ◆ Sinh()

 double Sinh ( Angle angle )
related

Returns the hyperbolic sine of an angle.

Parameters
 [in] angle The angle.
Returns
The hyperbolic sine.
Exceptions
 Does not throw any exception.

## ◆ Tan()

 double Tan ( Angle angle )
related

Returns the tangent of an angle.

Parameters
 [in] angle The angle.
Returns
The tangent.
Exceptions
 Does not throw any exception.

## ◆ Tanh()

 double Tanh ( Angle angle )
related

Returns the hyperbolic tangent of an angle.

Parameters
 [in] angle The angle.
Returns
The hyperbolic tangent.
Exceptions
 Does not throw any exception.