Added another constructor and more comments regarding degrees/radians to Rot2

release/4.3a0
Alex Cunningham 2010-07-08 14:39:06 +00:00
parent e675031d92
commit 2bd7a1c513
1 changed files with 10 additions and 2 deletions

View File

@ -16,7 +16,9 @@
namespace gtsam {
/* Rotation matrix */
/** Rotation matrix
* NOTE: the angle theta is in radians unless explicitly stated
*/
class Rot2: Testable<Rot2>, public Lie<Rot2> {
private:
@ -37,9 +39,15 @@ namespace gtsam {
/** "named constructors" */
/** Named constructor from angle == exponential map at identity */
/** Named constructor from angle == exponential map at identity - theta is in radians*/
static Rot2 fromAngle(double theta);
/** Named constructor from angle in degrees */
static Rot2 fromDegrees(double theta) {
const double degree = M_PI / 180;
return fromAngle(theta * degree);
}
/** Named constructor from cos(theta),sin(theta) pair, will *not* normalize! */
static Rot2 fromCosSin(double c, double s);