function testresult = rotatevector_test
%rotatevector_test

[U2 V2] = rotatevector (1,0,linspace(0,2*pi,5));

OK(1) = all(U2-[1 0 -1  0 1]) < 10.*realmin;
OK(2) = all(V2-[0 1  0 -1 0]) < 10.*realmin;


[U2 V2] = rotatevector (1,0,linspace(0,360,5));

OK(3) = all(U2-[1 0 -1  0 1]) < 10.*realmin;
OK(4) = all(V2-[0 1  0 -1 0]) < 10.*realmin;

testresult = all(OK);