%ROTTESTER   Tests inveuler.m
% Tests rot.m and invrot.m a times
%
% Syntax:  inveulertester(a)
%
% Inputs:
%    a - number of times to test
%
% Other m-files required: invrotaxis.m rot.m

% Author: Travis Hydzik
% Last revision: 19 October 2004

function rottester(a)

    for i=1:a
        
        disp('--------------------------------------------');
        
        a = 10*rand; %rand number between -5 nad 5
        b = 10*rand;
        c = 10*rand;
        theta = pi*rand; % 0 < theta < pi
        
        axis = [a b c]/norm([a b c])
        T = rot(axis,theta);
        [axisnew, thetanew] = invrotaxis(T); 
        theta
        thetanew
        toleq(theta,thetanew,0.001);
        axis
        axisnew
        toleq(axis,axisnew',0.001);

    end