jrlMathTools::Cangle Class Reference

This class implements simple computations on angles. More...

List of all members.

Public Member Functions

 Cangle ()
 Constructor.
 Cangle (const double &inAngle)
 Constructor by value.
 Cangle (const Cangle &inAngle)
 Copy Constructor.
 operator const double & () const
 Cast into a double.
const double & operator= (const double &inDouble)
 Operator = with a double.
Cangle operator- (Cangle inAngle) const
 Difference between two angles.
Cangle operator+ (Cangle inAngle) const
 Sum of two angles.
Cangle interpolate (const double &alpha, const Cangle &inAngle) const
 Interpolation between two angles.
double distance (const Cangle &inAngle) const
 Distance on unit circle.

Protected Member Functions

void setBetweenMinusAndPlusPI ()
 Set angle between -PI and PI.

Protected Attributes

double attAngle
 angular value.

Friends

Cangle operator* (const double &coef, const Cangle &inAngle)
 Multiplication of an angle by a real number.
std::ostream & operator<< (std::ostream &os, const Cangle &inAngle)
 output to a stream.
double cos (const Cangle &inAngle)
double sin (const Cangle &inAngle)
double tan (const Cangle &inAngle)

Detailed Description

This class implements simple computations on angles.


Constructor & Destructor Documentation

jrlMathTools::Cangle::Cangle (  )  [inline]

Constructor.

jrlMathTools::Cangle::Cangle ( const double &  inAngle  )  [inline]

Constructor by value.

jrlMathTools::Cangle::Cangle ( const Cangle inAngle  )  [inline]

Copy Constructor.


Member Function Documentation

double jrlMathTools::Cangle::distance ( const Cangle inAngle  )  const [inline]

Distance on unit circle.

Cangle jrlMathTools::Cangle::interpolate ( const double &  alpha,
const Cangle inAngle 
) const [inline]

Interpolation between two angles.

Parameters:
alpha interpolation parameter between 0 and 1.
inAngle second angle of interpolation.
Returns:
an angle between this one and inAngle along the shortest arc.
  • if alpha = 0, return this angle,
  • if alpha = 1, return inAngle.
jrlMathTools::Cangle::operator const double & (  )  const [inline]

Cast into a double.

Cangle jrlMathTools::Cangle::operator+ ( Cangle  inAngle  )  const [inline]

Sum of two angles.

Cangle jrlMathTools::Cangle::operator- ( Cangle  inAngle  )  const [inline]

Difference between two angles.

const double& jrlMathTools::Cangle::operator= ( const double &  inDouble  )  [inline]

Operator = with a double.

void jrlMathTools::Cangle::setBetweenMinusAndPlusPI (  )  [inline, protected]

Set angle between -PI and PI.


Friends And Related Function Documentation

double cos ( const Cangle inAngle  )  [friend]
Cangle operator* ( const double &  coef,
const Cangle inAngle 
) [friend]

Multiplication of an angle by a real number.

std::ostream& operator<< ( std::ostream &  os,
const Cangle inAngle 
) [friend]

output to a stream.

double sin ( const Cangle inAngle  )  [friend]
double tan ( const Cangle inAngle  )  [friend]

Member Data Documentation

double jrlMathTools::Cangle::attAngle [protected]

angular value.





jrlMathTools library documentation