next up previous contents index
Next: Function sqrt_cut Up: Module linearalgebra_module Previous: Function is_diagonal   Contents   Index

Function angle


\begin{boxedminipage}{\textwidth}
\begin{verbatim}a = angle(a,b)\end{verbatim}
\end{boxedminipage}

Return the (smallest) angle between two vectors, in radians. This is calculated as

\begin{displaymath}
\arccos\left(\frac{\mathbf{a}\cdot\mathbf{b}}{\vert\mathbf{a}\vert \vert\mathbf{b}\vert}\right)
\end{displaymath}

a, b -- real(dp), dimension(:), intent(in)

Return value -- real(dp)

sqrt_cut function

gabor 2009-06-30