#include <S1.h>
Public Member Functions | |
Angle () | |
Default constructor. | |
Angle (const Decimal &t) | |
Decimal constructor. | |
Angle (const Angle &rhs) | |
Copy constructor. | |
Angle & | operator= (const Angle &rhs) |
Assigment operator =. | |
Angle & | operator+= (const Angle &a) |
Compound assignment operator +=. | |
Angle & | operator-= (const Angle &other) |
Compound assignment operator -=. | |
Angle & | operator*= (const Angle &a) |
Compound assignment operator *=. | |
Angle & | operator*= (const Decimal &d) |
Compound assignment operator *= with scalar. | |
Angle | operator+ (const Angle &other) const |
Binary arithmetic operator +. | |
Angle | operator- (const Angle &other) const |
Binary arithmetic operator -. | |
Angle | operator* (const Angle &other) const |
Binary arithmetic operator *. | |
Angle | operator* (const Decimal &d) const |
Binary arithmetic operator * with scalar. | |
bool | operator== (const Angle &other) const |
Compound operator ==. | |
bool | operator!= (const Angle &other) const |
Compound operator !=. | |
Decimal | dCast () const |
Explicit casting to Decimal [0, 2*M_PI]. | |
Decimal | dCast2Pi () const |
Explicit casting to Decimal [0, 2*M_PI]. | |
Decimal | dCastPi (int opt=0) const |
Explicit casting to Decimal in (-M_PI, M_PI]. | |
Decimal | dCastDeg () const |
Explicit casting to Decimal, in degrees [0, 360.0). | |
UCoordmm | dCastHDeg () const |
Explicit casting to UCoordmm, in hundredths of degrees [0, 36000). | |
Decimal | alDiff (const Angle &other) const |
Algebric difference (in ]-PI,PI]). | |
Decimal | ccwDiff (const Angle &other) const |
Counter-clock-wise difference (in [0,2*PI[). | |
Decimal | cwDiff (const Angle &other) const |
Clock-wise difference (in ]-2*PI,0]). | |
bool | almostEqual (const Angle &A, const Decimal &toll) const |
Equal condition with a tollerance. | |
Angle | nearestMean (const Angle &other, Decimal w1=0.5) const |
The same as ccwMean but weighted. | |
Angle | ccwMean (const Angle &other) const |
Counter-clock-wise mean, i.e, mean angle in ]this, other]. | |
Angle | cwMean (const Angle &other) const |
Clock-wise mean, i.e, mean angle in ]other, this]. | |
string | print (int precision=2) const |
Print function. |
Angle::Angle | ( | ) | [inline] |
Default constructor.
Angle::Angle | ( | const Decimal & | t | ) | [inline] |
Decimal constructor.
Angle::Angle | ( | const Angle & | rhs | ) | [inline] |
Copy constructor.
Compound assignment operator *= with scalar.
Binary arithmetic operator * with scalar.
bool Angle::operator== | ( | const Angle & | other | ) | const [inline] |
Compound operator ==.
bool Angle::operator!= | ( | const Angle & | other | ) | const [inline] |
Compound operator !=.
Decimal Angle::dCast | ( | ) | const [inline] |
Explicit casting to Decimal [0, 2*M_PI].
Decimal Angle::dCast2Pi | ( | ) | const [inline] |
Explicit casting to Decimal [0, 2*M_PI].
Decimal Angle::dCastPi | ( | int | opt = 0 |
) | const [inline] |
Explicit casting to Decimal in (-M_PI, M_PI].
Decimal Angle::dCastDeg | ( | ) | const [inline] |
Explicit casting to Decimal, in degrees [0, 360.0).
UCoordmm Angle::dCastHDeg | ( | ) | const [inline] |
Explicit casting to UCoordmm, in hundredths of degrees [0, 36000).
Algebric difference (in ]-PI,PI]).
i.e, other - this in [0,2*PI[.
[in] | other | The Angle respect to it is computed the algebric distance. |
Counter-clock-wise difference (in [0,2*PI[).
i.e, other - this in in [0,2*PI[.
[in] | other | The other angle. |
Clock-wise difference (in ]-2*PI,0]).
i.e, other - this in in ]-2*PI,0].
other | The other angle. |
Counter-clock-wise mean, i.e, mean angle in ]this, other].
If this == other, it is by definition this + M_PI.
[in] | other | The other angle. |
Clock-wise mean, i.e, mean angle in ]other, this].
if this == other, it is by definition this.
[in] | other | The other angle. |
string Angle::print | ( | int | precision = 2 |
) | const |
Print function.
[in] | precision | The number of decimals (default is 2). |