wrapToPi
Wrap angle in radians to [−pi pi]
Description
wraps angles inlambdaWrapped
= wrapToPi(lambda
)lambda
, in radians, to the interval[−pi, pi]
such thatpi
maps topi
and−pi
maps to−pi
. In general, odd, positive multiples ofpi
map topi
and odd, negative multiples ofpi
map to−pi
.