#include <angle_deg.h>
Public メソッド | |
AngleDeg () | |
default constructor. | |
AngleDeg (const double °) | |
constructor with value. | |
const AngleDeg & | operator= (const double °) |
operator substitution. | |
const double & | degree () const |
get value of this angle | |
double | abs () const |
get absolute value of this angle | |
double | radian () const |
get RADIAN value. | |
AngleDeg | operator- () const |
get new AngleDeg multiplyed by -1. | |
const AngleDeg & | operator+= (const AngleDeg &angle) |
operator += with AngleDeg | |
const AngleDeg & | operator+= (const double °) |
operator += with double | |
const AngleDeg & | operator-= (const AngleDeg &angle) |
operator -= with AngleDeg | |
const AngleDeg & | operator-= (const double °) |
operator -= with double | |
const AngleDeg & | operator *= (const double &scalar) |
operator *= | |
const AngleDeg & | operator/= (const double &scalar) |
operator /= | |
bool | isLeftOf (const AngleDeg &angle) const |
check if this angle is left of 'angle' | |
bool | isLeftEqualOf (const AngleDeg &angle) const |
check if this angle is left or equal of 'angle' | |
bool | isRightOf (const AngleDeg &angle) const |
check if this angle is right of 'angle' | |
bool | isRightEqualOf (const AngleDeg &angle) const |
check if this angle is right or equal of 'angle' | |
double | cos () const |
calculate cosine | |
double | sin () const |
calculate sine | |
double | tan () const |
calculate tarngetn | |
bool | isWithin (const AngleDeg &left, const AngleDeg &right) const |
check if this angle is within [left, right] (turn clockwise). | |
void | sinMinMax (const double &angle_err, double *minsin, double *maxsin) const |
calculate min/max sine value with angle error. | |
void | cosMinMax (const double &angle_err, double *mincos, double *maxcos) const |
calculate min/max cosine value of angle with angle error. | |
std::ostream & | print (std::ostream &os) const |
output value to ostream | |
std::ostream & | printRound (std::ostream &os, const double &step=0.1) const |
output rounded value to ostream | |
Static Public メソッド | |
static double | normalize_angle (double dir) |
static utility. normalize angle | |
static double | rad2deg (const double &rad) |
static utility. convert radian to degree | |
static double | deg2rad (const double °) |
static utility. convert degree to radian | |
static double | cos_deg (const double °) |
static utility. calculate cosine value for degree angle | |
static double | sin_deg (const double °) |
static utility. calculate sine value for degree angle | |
static double | tan_deg (const double °) |
static utility. calculate tangent value for degree angle | |
static double | acos_deg (const double &cosine) |
static utility. calculate arc cosine value | |
static double | asin_deg (const double &sine) |
static utility. calculate arc sine value | |
static double | atan_deg (const double &tangent) |
static utility. calculate arc tangent value | |
static double | atan2_deg (const double &y, const double &x) |
static utility. calculate arc tangent value from XY | |
static AngleDeg | bisect (const AngleDeg &left, const AngleDeg &right) |
static utility that returns bisect angle of [left, right]. | |
Static Public 変数 | |
static const double | EPSILON |
epsilon value | |
static const double | DEG2RAD |
constant variable to convert DEGREE to RADIAN. | |
static const double | RAD2DEG |
constant variable to convert RADIAN to DEGREE. | |
構成 | |
class | DegreeCmp |
predicate function object. this compares two angles by degree value [詳細] |
rcsc::AngleDeg::AngleDeg | ( | const double & | deg | ) | [inline] |
constructor with value.
NO explicit. This means that we can use this class as follows. AngleDeg angle = 3.0;
const AngleDeg& rcsc::AngleDeg::operator= | ( | const double & | deg | ) | [inline] |
operator substitution.
deg | initialization parameter |
const double& rcsc::AngleDeg::degree | ( | ) | const [inline] |
get value of this angle
double rcsc::AngleDeg::abs | ( | ) | const [inline] |
double rcsc::AngleDeg::radian | ( | ) | const [inline] |
AngleDeg rcsc::AngleDeg::operator- | ( | ) | const [inline] |
const AngleDeg& rcsc::AngleDeg::operator+= | ( | const double & | deg | ) | [inline] |
operator += with double
deg | added value |
const AngleDeg& rcsc::AngleDeg::operator-= | ( | const double & | deg | ) | [inline] |
operator -= with double
deg | subtract argument |
const AngleDeg& rcsc::AngleDeg::operator *= | ( | const double & | scalar | ) | [inline] |
operator *=
scalar | multiply argument |
const AngleDeg& rcsc::AngleDeg::operator/= | ( | const double & | scalar | ) | [inline] |
operator /=
scalar | division argument |
bool rcsc::AngleDeg::isLeftOf | ( | const AngleDeg & | angle | ) | const [inline] |
check if this angle is left of 'angle'
bool rcsc::AngleDeg::isLeftEqualOf | ( | const AngleDeg & | angle | ) | const [inline] |
check if this angle is left or equal of 'angle'
bool rcsc::AngleDeg::isRightOf | ( | const AngleDeg & | angle | ) | const [inline] |
check if this angle is right of 'angle'
bool rcsc::AngleDeg::isRightEqualOf | ( | const AngleDeg & | angle | ) | const [inline] |
check if this angle is right or equal of 'angle'
double rcsc::AngleDeg::cos | ( | ) | const [inline] |
calculate cosine
double rcsc::AngleDeg::sin | ( | ) | const [inline] |
calculate sine
double rcsc::AngleDeg::tan | ( | ) | const [inline] |
calculate tarngetn
check if this angle is within [left, right] (turn clockwise).
left | left angle | |
right | right angle |
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 |
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 |
static double rcsc::AngleDeg::normalize_angle | ( | double | dir | ) | [inline, static] |
static utility. normalize angle
dir | angle value to be normalized |
static double rcsc::AngleDeg::rad2deg | ( | const double & | rad | ) | [inline, static] |
static utility. convert radian to degree
rad | radian value |
static double rcsc::AngleDeg::deg2rad | ( | const double & | deg | ) | [inline, static] |
static utility. convert degree to radian
deg | degree value |
static double rcsc::AngleDeg::cos_deg | ( | const double & | deg | ) | [inline, static] |
static utility. calculate cosine value for degree angle
deg | degree value |
static double rcsc::AngleDeg::sin_deg | ( | const double & | deg | ) | [inline, static] |
static utility. calculate sine value for degree angle
deg | degree value |
static double rcsc::AngleDeg::tan_deg | ( | const double & | deg | ) | [inline, static] |
static utility. calculate tangent value for degree angle
deg | degree value |
static double rcsc::AngleDeg::acos_deg | ( | const double & | cosine | ) | [inline, static] |
static utility. calculate arc cosine value
cosine | cosine value |
static double rcsc::AngleDeg::asin_deg | ( | const double & | sine | ) | [inline, static] |
static utility. calculate arc sine value
sine | sine value |
static double rcsc::AngleDeg::atan_deg | ( | const double & | tangent | ) | [inline, static] |
static utility. calculate arc tangent value
tangent | tangent value |
static double rcsc::AngleDeg::atan2_deg | ( | const double & | y, | |
const double & | x | |||
) | [inline, static] |
static utility. calculate arc tangent value from XY
y | coordinate Y | |
x | coordinate X |
static utility that returns bisect angle of [left, right].
left | left start angle | |
right | right end angle |
std::ostream& rcsc::AngleDeg::print | ( | std::ostream & | os | ) | const [inline] |
output value to ostream
os | reference to the output stream |
std::ostream& rcsc::AngleDeg::printRound | ( | std::ostream & | os, | |
const double & | step = 0.1 | |||
) | const [inline] |
output rounded value to ostream
os | reference to the output stream | |
step | round step |