Small utility function for Rot2 to return degrees
parent
3245bad2aa
commit
8aad6443bd
|
@ -54,9 +54,15 @@ namespace gtsam {
|
|||
/** Named constructor that behaves as atan2, i.e., y,x order (!) and normalizes */
|
||||
static Rot2 atan2(double y, double x);
|
||||
|
||||
/** return angle */
|
||||
/** return angle (RADIANS) */
|
||||
double theta() const { return ::atan2(s_,c_); }
|
||||
|
||||
/** return angle (DEGREES) */
|
||||
double degrees() const {
|
||||
const double degree = M_PI / 180;
|
||||
return theta() / degree;
|
||||
}
|
||||
|
||||
/** return cos */
|
||||
inline double c() const { return c_; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue