AngNormalize.m 226 Bytes
Newer Older
Valentin Platzgummer's avatar
Valentin Platzgummer committed
1 2 3 4 5 6 7 8 9
function x = AngNormalize(x)
%ANGNORMALIZE  Reduce angle to range (-180, 180]
%
%   x = ANGNORMALIZE(x) reduces angles to the range (-180, 180].  x can be
%   any shape.

  x = remx(x, 360);
  x(x == -180) = 180;
end