next up previous contents index
Next: Function random_unit_vector Up: Module linearalgebra_module Previous: Function vector_triple_product   Contents   Index

Function unit_vector


\begin{boxedminipage}{\textwidth}
\begin{verbatim}u = unit_vector(theta,phi)\end{verbatim}
\end{boxedminipage}

Return a unit vector in the direction given by the angles theta and phi, i.e. convert the spherical polar coordinates point $(1,\theta,\phi)$ to cartesians.

theta, phi -- real(dp), intent(in)

Return value -- real(dp), dimension(3)

random_unit_vector function

gabor 2009-06-30