|
LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
|
degree wrapper class More...
#include <angle_deg.h>
Public Member Functions | |
| AngleDeg () | |
| default constructor. | |
| AngleDeg (const double deg) | |
| constructor with value. More... | |
| const AngleDeg & | operator= (const double deg) |
| operator substitution. More... | |
| double | degree () const |
| get value of this angle More... | |
| double | abs () const |
| get absolute value of this angle More... | |
| double | radian () const |
| get RADIAN value. More... | |
| AngleDeg | operator- () const |
| get new AngleDeg multiplyed by -1. More... | |
| const AngleDeg & | operator+= (const AngleDeg &angle) |
| operator += with AngleDeg More... | |
| const AngleDeg & | operator+= (const double deg) |
| operator += with double More... | |
| const AngleDeg & | operator-= (const AngleDeg &angle) |
| operator -= with AngleDeg More... | |
| const AngleDeg & | operator-= (const double deg) |
| operator -= with double More... | |
| const AngleDeg & | operator*= (const double scalar) |
| operator *= More... | |
| const AngleDeg & | operator/= (const double scalar) |
| operator /= More... | |
| bool | isLeftOf (const AngleDeg &angle) const |
| check if this angle is left of 'angle' More... | |
| bool | isLeftEqualOf (const AngleDeg &angle) const |
| check if this angle is left or equal of 'angle' More... | |
| bool | isRightOf (const AngleDeg &angle) const |
| check if this angle is right of 'angle' More... | |
| bool | isRightEqualOf (const AngleDeg &angle) const |
| check if this angle is right or equal of 'angle' More... | |
| double | cos () const |
| calculate cosine More... | |
| double | sin () const |
| calculate sine More... | |
| double | tan () const |
| calculate tarngetn More... | |
| bool | isWithin (const AngleDeg &left, const AngleDeg &right) const |
| check if this angle is within [left, right] (turn clockwise). More... | |
| void | sinMinMax (const double angle_err, double *minsin, double *maxsin) const |
| calculate min/max sine value with angle error. More... | |
| void | cosMinMax (const double angle_err, double *mincos, double *maxcos) const |
| calculate min/max cosine value of angle with angle error. More... | |
| std::ostream & | print (std::ostream &os) const |
| output value to ostream More... | |
| std::ostream & | printRound (std::ostream &os, const double step=0.1) const |
| output rounded value to ostream More... | |
Static Public Member Functions | |
| static double | normalize_angle (double dir) |
| static utility. normalize angle More... | |
| static double | rad2deg (const double rad) |
| static utility. convert radian to degree More... | |
| static double | deg2rad (const double deg) |
| static utility. convert degree to radian More... | |
| static double | cos_deg (const double deg) |
| static utility. calculate cosine value for degree angle More... | |
| static double | sin_deg (const double deg) |
| static utility. calculate sine value for degree angle More... | |
| static double | tan_deg (const double deg) |
| static utility. calculate tangent value for degree angle More... | |
| static double | acos_deg (const double cosine) |
| static utility. calculate arc cosine value More... | |
| static double | asin_deg (const double sine) |
| static utility. calculate arc sine value More... | |
| static double | atan_deg (const double tangent) |
| static utility. calculate arc tangent value More... | |
| static double | atan2_deg (const double y, const double x) |
| static utility. calculate arc tangent value from XY More... | |
| static AngleDeg | bisect (const AngleDeg &left, const AngleDeg &right) |
| static utility that returns bisect angle of [left, right]. More... | |
degree wrapper class
|
inline |
constructor with value.
NO explicit. This means that we can use this class as follows. AngleDeg angle = 3.0;
|
inline |
get absolute value of this angle
|
inlinestatic |
static utility. calculate arc cosine value
| cosine | cosine value |
|
inlinestatic |
static utility. calculate arc sine value
| sine | sine value |
|
inlinestatic |
static utility. calculate arc tangent value from XY
| y | coordinate Y |
| x | coordinate X |
|
inlinestatic |
static utility. calculate arc tangent value
| tangent | tangent value |
static utility that returns bisect angle of [left, right].
| left | left start angle |
| right | right end angle |
this methid can take obtuse angle.
|
inline |
calculate cosine
|
inlinestatic |
static utility. calculate cosine value for degree angle
| deg | degree value |
| void rcsc::AngleDeg::cosMinMax | ( | const double | angle_err, |
| double * | mincos, | ||
| double * | maxcos | ||
| ) | const |
calculate min/max cosine value of angle with angle error.
| angle_err | error value of angle |
| mincos | pointer to the solution variable to store the min value |
| maxcos | pointer to the solution variable to store the max value |
|
inlinestatic |
static utility. convert degree to radian
| deg | degree value |
|
inline |
get value of this angle
|
inline |
check if this angle is left or equal of 'angle'
|
inline |
check if this angle is left of 'angle'
|
inline |
check if this angle is right or equal of 'angle'
|
inline |
check if this angle is right of 'angle'
check if this angle is within [left, right] (turn clockwise).
| left | left angle |
| right | right angle |
|
inlinestatic |
static utility. normalize angle
| dir | angle value to be normalized |
|
inline |
operator *=
| scalar | multiply argument |
|
inline |
operator += with double
| deg | added value |
|
inline |
|
inline |
operator -= with double
| deg | subtract argument |
|
inline |
operator /=
| scalar | division argument |
|
inline |
operator substitution.
| deg | initialization parameter |
|
inline |
output value to ostream
| os | reference to the output stream |
|
inline |
output rounded value to ostream
| os | reference to the output stream |
| step | round step |
|
inlinestatic |
static utility. convert radian to degree
| rad | radian value |
|
inline |
get RADIAN value.
|
inline |
calculate sine
|
inlinestatic |
static utility. calculate sine value for degree angle
| deg | degree value |
| void rcsc::AngleDeg::sinMinMax | ( | const double | angle_err, |
| double * | minsin, | ||
| double * | maxsin | ||
| ) | const |
calculate min/max sine value with angle error.
| angle_err | error value of angle |
| minsin | pointer to the solution variable to store the min value |
| maxsin | pointer to the solution variable to store the max value |
|
inline |
calculate tarngetn
|
inlinestatic |
static utility. calculate tangent value for degree angle
| deg | degree value |