diff --git a/geometry/Rot2.h b/geometry/Rot2.h index dbc4a12d7..1d77ce49c 100644 --- a/geometry/Rot2.h +++ b/geometry/Rot2.h @@ -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_; }