function y = mod360(x)

% y = mod360(x)

%    Copyright (C) 1995-1998
%    Massachussetts Institute of Technology
%    Sea Grant AUV Laboratory
%    $Id: mod360.m,v 1.1 2000/01/10 19:08:09 rob Exp $	

y = rem( x, 360 );
ii = find( y < 0 );
if ~isempty( ii )
    y(ii) = y(ii) + 360;
end
