MIRA
|
Base class for angle classes that represent angles using radians. More...
#include <math/Angle.h>
Public Member Functions | |
void | reflect (Reflector &r) |
void | setValue (const T &value) |
Set the angle value. The input value is mapped into the angle interval. More... | |
const T & | value () const |
Returns the raw angle value given in the native unit of the angle class. More... | |
operator T () const | |
Conversion function to native type (same as value() ) More... | |
void | setSerializedValue (const T &value) |
Sets the value in the unit that is used for serialization. More... | |
T | serializedValue () const |
Returns the value in the unit that is used for serialization. More... | |
T | deg () const |
Returns the value of the angle in degrees. More... | |
T | rad () const |
Returns the value of the angle in radian. More... | |
Derived | operator- () const |
Unary minus operator. More... | |
Derived | operator+= (const AngleBase< T, OtherUnitTag, OtherDerived > &a) |
Add other angle to this angle. More... | |
Derived & | operator+= (const T &a) |
Add float value to this angle. More... | |
Derived | operator-= (const AngleBase< T, OtherUnitTag, OtherDerived > &a) |
Subtract other angle from this angle. More... | |
Derived & | operator-= (const T &a) |
Subtract float value from this angle. More... | |
Derived & | operator*= (const T &s) |
Multiply this angle with scalar. More... | |
Derived & | operator/= (const T &s) |
Divide this angle by scalar. More... | |
T | smallestDifferenceValue (const Derived &other) const |
Returns the signed difference angle between this angle and the specified other angle that has the smallest absolute value. More... | |
bool | isInInterval (const Derived &min, const Derived &max) const |
Returns true, if the angle is in the given interval [min,max]. More... | |
Static Public Member Functions | |
static T | turn () |
Returns the amount of a turn (full circle) that is equal to 360 deg. More... | |
static T | convertToSerialized (T value) |
Converts own representation to serialized representation. More... | |
static T | convertFromSerialized (T value) |
Converts serialized representation to own representation. More... | |
static T | upper () |
Returns the upper limit of the defined angle interval. More... | |
static const char * | unit () |
Returns the unit of this angle representation as string, e.g. More... | |
Protected Attributes | |
T | mValue |
the actual value More... | |
Friends | |
class | AngleBase< T, Private::RadianUnitTag, Derived > |
Base class for angle classes that represent angles using radians.
|
inlinestatic |
Returns the amount of a turn (full circle) that is equal to 360 deg.
|
inlinestatic |
Converts own representation to serialized representation.
|
inlinestatic |
Converts serialized representation to own representation.
|
inlineinherited |
|
inlinestaticinherited |
Returns the upper limit of the defined angle interval.
Note, that the upper limit does not belong to the interval itself, hence the interval is [lower,upper) .
|
inlineinherited |
Set the angle value. The input value is mapped into the angle interval.
|
inlineinherited |
Returns the raw angle value given in the native unit of the angle class.
|
inlineexplicitinherited |
Conversion function to native type (same as value() )
Implicit conversion is intentionally disabled, in order to prevent potentially erroneous usage like
|
inlineinherited |
Sets the value in the unit that is used for serialization.
The Angle and SignedAngle classes use radians for storing the value internal and degrees for serializing the value to simplify the usage for the human user. For the other classes Degree, SignedDegree, Radian and SignedRadian setValue() and setSerializedValue() are doing the same.
|
inlineinherited |
Returns the value in the unit that is used for serialization.
The Angle and SignedAngle classes use radians for storing the value internal and degrees for serializing the value to simplify the usage for the human user. For the other classes Degree, SignedDegree, Radian and SignedRadian value() and serializedValue() yield the same result.
|
inlineinherited |
Returns the value of the angle in degrees.
|
inlineinherited |
Returns the value of the angle in radian.
|
inlineinherited |
Unary minus operator.
|
inlineinherited |
Add other angle to this angle.
|
inlineinherited |
Add float value to this angle.
|
inlineinherited |
Subtract other angle from this angle.
|
inlineinherited |
Subtract float value from this angle.
|
inlineinherited |
Multiply this angle with scalar.
|
inlineinherited |
Divide this angle by scalar.
|
inlineinherited |
Returns the signed difference angle between this angle and the specified other angle that has the smallest absolute value.
This method is similar to smallestDifference() but returns a floating point value instead of a signed angle class object.
|
inlineinherited |
Returns true, if the angle is in the given interval [min,max].
If max<min, both values will be swapped.
|
inlinestaticinherited |
Returns the unit of this angle representation as string, e.g.
"rad" or "deg"
|
friend |
|
protectedinherited |
the actual value