%---------------------------Minimum Angle-----------------------------
\section{Minimum Angle}

In order to properly compute the included angle, we'll need to
correct for incorrectly oriented elements.
Let
\[
s_i = \left\{ \begin{array}{ll}
  1\rule{2em}{0pt} & \alpha_i < 0\\
  0                & \alpha_i \geq 0
  \end{array}\right.
\]
The included angle between two neighboring edges is
\[
\theta_i = (-1)^{s_i} \arccos{ \left( - \frac {\vec L_{i} \cdot \vec L_{i+1} }
                                {\normvec{L_{i}} \normvec{L_{i+1}}} \right) } 
                                  \left( \frac {180} {\pi} \right) 
           + 360\dgr s_i
\]
where $i\in\{0,1,2,3\}$ and $\vec L_4 = \vec L_0$.
We take the minimum of this quantity as the value of the metric:
\[
q = \min_{i\in\{0,1,2,3\}}\left\{ \theta_i \right\}
\]

Note that if $\normvec{L_i} \leq DBL\_MIN$ or $\normvec{L_{i+1}} \leq DBL\_MIN$,
\verd\ returns $q = 360\dgr$.

\quadmetrictable{minimum included angle}%
{$A^1$}%                                    Dimension
{$[45\dgr,90\dgr]$}%                        Acceptable range
{$[0\dgr,90\dgr]$}%                         Normal range
{$[0\dgr,360\dgr]$}%                        Full range
{$90\dgr$}%                                 Unit square
{--}%                                       Citation
{v\_quad\_minimum\_angle}%                  Verdict function name

