Eliminated map overrotation on drift pan

Wrap the angle on each interpolated step instead of when normalizing.
This commit is contained in:
Minh Nguyễn
2015-07-05 00:50:19 -07:00
parent a22efd4e80
commit 08acb65b1c

View File

@@ -337,7 +337,7 @@ void Transform::_setAngle(double new_angle, const Duration duration) {
startTransition(
[=](double t) {
state.angle = util::interpolate(startA, angle, t);
state.angle = util::wrap(util::interpolate(startA, angle, t), -M_PI, M_PI);
view.notifyMapChange(MapChangeRegionIsChanging);
return Update::Nothing;
},