\input manualMacros.tex
\manBegin
\manPageInfo{RCCL Reference Manual}{}{}
\manTitle{vect}{3}
\manSection{NAME}
{\rightskip=0ptplus1fil
{\tt \manName{crossVect}},
{\tt \manName{unitVect}},
{\tt \manName{dotVect}}
-- RCCL 3-vector routines.
}
\manSection{USAGE}
\cverbatim
#include <robotTypes.h>    /* included as part of <rccl.h> */

VECT *crossVect (vr, v1, v2)
  VECT *vr, *v1, *v2;

VECT *unitVect (vr, v1)
  VECT *vr, *v1

float dotVect (v1, v2)
  VECT *v1, *v2;

VECT *addVect (vr, v1 ,v2)
  VECT *vr, *v1, *v2;

VECT *subtractVect (vr, v1 ,v2)
  VECT *vr, *v1, *v2;

VECT *scaleVect (vr, a, v1)
  VECT *vr, *v1;
  float a;

VECT *combineVect (vr, a, v1, b, v2)
  VECT *vr, *v1, *v2;
  float a, b;

float normVect(v1)
  VECT *v1;

VECT *zeroVect(vr)
  VECT *vr;
@endcverbatim
\manSection{ARGUMENTS}
\manItem{{\tt vr} --}
Result vector.
\manItem{{\tt v1}, {\tt v2} --}
Input vectors.
\manItem{{\tt a}, {\tt b} --}
Input scalars.
\manSection{DESCRIPTION}
{\tt crossVect()} computes the cross product of two vectors:
\manIfTeX
$$
{\bf v}\sb r \;=\; {\bf v}\sb 1 \times {\bf v} \sb 2
$$
\manElse
\cverbatim
        vr = v1 X v2
@endcverbatim
\manFi

{\tt unitVect()} normalizes its input vector:
\manIfTeX
$$
{\bf v}\sb r \;=\; {\bf v}\sb 1 / |{\bf v} \sb 1|
$$
\manElse
\cverbatim
        vr = v1 / |v1|
@endcverbatim
\manFi

{\tt dotVect()} returns the dot product of two vectors.

{\tt addVect()} adds two vectors:
\manIfTeX
$$
{\bf v}\sb r \;=\; {\bf v}\sb 1 + {\bf v} \sb 2
$$
\manElse
\cverbatim
        vr = v1 + v2
@endcverbatim
\manFi

{\tt subtractVect()} subtracts two vectors:
\manIfTeX
$$
{\bf v}\sb r \;=\; {\bf v}\sb 1 - {\bf v} \sb 2
$$
\manElse
\cverbatim
        vr = v1 - v2
@endcverbatim
\manFi

{\tt scaleVect()} multiplies a vector by a scalar:
\manIfTeX
$$
{\bf v}\sb r \;=\; a {\bf v}\sb 1
$$
\manElse
\cverbatim
        vr = a v1
@endcverbatim
\manFi

{\tt combineVect()} computes a linear combination of two vectors:
\manIfTeX
$$
{\bf v}\sb r \;=\; a {\bf v}\sb 1 + b {\bf v} \sb 2
$$
\manElse
\cverbatim
        vr = a v1 + b v2
@endcverbatim
\manFi

{\tt normVect()} returns the 2-norm of a vector.

{\tt zeroVect()} zeros a vector.

The routines which compute a vector return a pointer to their
result parameter {\tt vr}.

\manSection{DIAGNOSTICS}
{\tt unitVect()} returns {\tt NULL} if the input vector is too small to
normalize. 
\manSection{NOTES}
These routines somewhat parallel the more general floating and double
precision vector routines (see {\tt addVf(3)} and {\tt addVd(3)}), but are
faster because the internal loops have been unrolled.
\manSection{SEE ALSO}
\rightskip=0ptplus1fil
{\tt addVd(3)}, {\tt addVf(3)}.
\manEnd
\end
