TEST( Rot2, unrotate) { Matrix H1, H2; Point2 w = R * P, actual = R.unrotate(w, H1, H2); CHECK(assert_equal(actual,P)); Matrix numerical1 = numericalDerivative21(unrotate_, R, w); CHECK(assert_equal(numerical1,H1)); Matrix numerical2 = numericalDerivative22(unrotate_, R, w); CHECK(assert_equal(numerical2,H2)); }
// unrotate and derivatives inline Point2 unrotate_(const Rot2& R, const Point2& p) {return R.unrotate(p);}