% function y = negangle(x)
%
%   Calculate the angle of X, in the range 0 to -2 pi radians.

function y = negangle(x)
if nargin ~= 1,
	disp('usage: y = negangle(x)')
	return
	end

y = angle(x);
ind = find(y > 0);
y(ind) = y(ind) - 2*pi;
%
% Copyright MUSYN INC 1991,  All Rights Reserved
