removed unecessary block oprations

release/4.3a0
nsrinivasan7 2014-11-30 15:45:37 -05:00
parent 8457ef4182
commit 010631a2eb
1 changed files with 2 additions and 2 deletions

View File

@ -100,12 +100,12 @@ Rot2 Rot2::relativeBearing(const Point2& d, OptionalJacobian<1, 2> H) {
double x = d.x(), y = d.y(), d2 = x * x + y * y, n = sqrt(d2);
if(fabs(n) > 1e-5) {
if (H) {
(*H).block(0,0,1,2) << -y / d2, x / d2;
(*H) << -y / d2, x / d2;
}
return Rot2::fromCosSin(x / n, y / n);
} else {
if (H) {
(*H).block(0,0,1,2) << 0.0, 0.0;
(*H) << 0.0, 0.0;
}
return Rot2();
}