function r = rotate2d(v,alpha)

% 	rotate2d.m:<vector> <rotation angle>
%	positive clockwise
%	BAB 2/3/00
%
%WARNING: SOMETIMES GIVE VALUES LOWER THAN EPS WHEN IT SHOULD BE ==0;could lead to errors in find statements

rad = pi/180;
alpha = alpha*rad;

[m,n] = size(v);
if m ~= 2
	v=v';
end

T = [cos(alpha) sin(alpha) 0;
   -sin(alpha) cos(alpha) 0;
	0	0	1];

% T = [cos(alpha) sin(alpha);
%    -sin(alpha) cos(alpha)];
r=T*v;
r=r';

