\hypertarget{group__Math__util}{}\section{Math Utilities}
\label{group__Math__util}\index{Math Utilities@{Math Utilities}}


Math utilities.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$class T $>$ }\\T \hyperlink{group__Math__util_gac61d3faf45ca48ec2acc1d6b637a9324}{S\+P\+L\+::abs\+Val} (T x)
\begin{DoxyCompactList}\small\item\em The absolute value function. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\T \hyperlink{group__Math__util_gaf3c98127d138aa9a55dfb583bef9bcf8}{S\+P\+L\+::signum} (T x)
\begin{DoxyCompactList}\small\item\em The signum function. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\T \hyperlink{group__Math__util_gad504346219317cffc75ee0b6f2b2bc46}{S\+P\+L\+::sqr} (const T \&x)
\begin{DoxyCompactList}\small\item\em The square function. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\T \hyperlink{group__Math__util_ga10fe03a566e630e9427004018b4071bd}{S\+P\+L\+::clip} (T x, T min, T max)
\begin{DoxyCompactList}\small\item\em The clip function. \end{DoxyCompactList}\item 
double \hyperlink{group__Math__util_ga4fc2362acb83c8ba12888ab4b4ec490b}{S\+P\+L\+::sinc} (double x)
\begin{DoxyCompactList}\small\item\em The cardinal sine function. \end{DoxyCompactList}\item 
long \hyperlink{group__Math__util_ga82eb348e0bb13f3f70ff4e42c6384981}{S\+P\+L\+::round\+Toward\+Zero\+Div} (long x, long y)
\begin{DoxyCompactList}\small\item\em Compute a quotient with the result rounded towards zero. \end{DoxyCompactList}\item 
long \hyperlink{group__Math__util_gac2a4d93c3129769bac3fad0cb4e2b745}{S\+P\+L\+::floor\+Div} (long x, long y)
\begin{DoxyCompactList}\small\item\em Compute the floor of a quotient. \end{DoxyCompactList}\item 
{\footnotesize template$<$class T $>$ }\\T \hyperlink{group__Math__util_gac437cced669a62918bdf9878f2aebaa1}{S\+P\+L\+::mod} (T x, T y)
\begin{DoxyCompactList}\small\item\em Compute the remainder after division. \end{DoxyCompactList}\item 
long \hyperlink{group__Math__util_gac0797f2cd74c9c84b032dfa35ddb8026}{S\+P\+L\+::ceil\+Div} (long x, long y)
\begin{DoxyCompactList}\small\item\em Compute the ceiling of a quotient. \end{DoxyCompactList}\item 
double \hyperlink{group__Math__util_ga840c71714814d55ac3f72a3b66f7d51f}{S\+P\+L\+::rad\+To\+Deg} (double x)
\begin{DoxyCompactList}\small\item\em Convert from radians to degrees. \end{DoxyCompactList}\item 
double \hyperlink{group__Math__util_gad36b8cdeba0d7979e3dec0d3df02cfc7}{S\+P\+L\+::deg\+To\+Rad} (double x)
\begin{DoxyCompactList}\small\item\em Convert from degrees to radians. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Math utilities. 



\subsection{Function Documentation}
\hypertarget{group__Math__util_gac61d3faf45ca48ec2acc1d6b637a9324}{}\index{Math Utilities@{Math Utilities}!abs\+Val@{abs\+Val}}
\index{abs\+Val@{abs\+Val}!Math Utilities@{Math Utilities}}
\subsubsection[{abs\+Val}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T S\+P\+L\+::abs\+Val (
\begin{DoxyParamCaption}
\item[{T}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gac61d3faf45ca48ec2acc1d6b637a9324}


The absolute value function. 

Returns\+: The absolute value of the quantity x is returned. \hypertarget{group__Math__util_gac0797f2cd74c9c84b032dfa35ddb8026}{}\index{Math Utilities@{Math Utilities}!ceil\+Div@{ceil\+Div}}
\index{ceil\+Div@{ceil\+Div}!Math Utilities@{Math Utilities}}
\subsubsection[{ceil\+Div}]{\setlength{\rightskip}{0pt plus 5cm}long S\+P\+L\+::ceil\+Div (
\begin{DoxyParamCaption}
\item[{long}]{x, }
\item[{long}]{y}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gac0797f2cd74c9c84b032dfa35ddb8026}


Compute the ceiling of a quotient. 

Returns\+: The ceiling of x divided by y is returned. \hypertarget{group__Math__util_ga10fe03a566e630e9427004018b4071bd}{}\index{Math Utilities@{Math Utilities}!clip@{clip}}
\index{clip@{clip}!Math Utilities@{Math Utilities}}
\subsubsection[{clip}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T S\+P\+L\+::clip (
\begin{DoxyParamCaption}
\item[{T}]{x, }
\item[{T}]{min, }
\item[{T}]{max}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_ga10fe03a566e630e9427004018b4071bd}


The clip function. 

\hypertarget{group__Math__util_gad36b8cdeba0d7979e3dec0d3df02cfc7}{}\index{Math Utilities@{Math Utilities}!deg\+To\+Rad@{deg\+To\+Rad}}
\index{deg\+To\+Rad@{deg\+To\+Rad}!Math Utilities@{Math Utilities}}
\subsubsection[{deg\+To\+Rad}]{\setlength{\rightskip}{0pt plus 5cm}double S\+P\+L\+::deg\+To\+Rad (
\begin{DoxyParamCaption}
\item[{double}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gad36b8cdeba0d7979e3dec0d3df02cfc7}


Convert from degrees to radians. 

Returns\+: The quantity x converted (from degrees) to radians is returned. \hypertarget{group__Math__util_gac2a4d93c3129769bac3fad0cb4e2b745}{}\index{Math Utilities@{Math Utilities}!floor\+Div@{floor\+Div}}
\index{floor\+Div@{floor\+Div}!Math Utilities@{Math Utilities}}
\subsubsection[{floor\+Div}]{\setlength{\rightskip}{0pt plus 5cm}long S\+P\+L\+::floor\+Div (
\begin{DoxyParamCaption}
\item[{long}]{x, }
\item[{long}]{y}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gac2a4d93c3129769bac3fad0cb4e2b745}


Compute the floor of a quotient. 

Returns\+: The floor of x divided by y is returned. \hypertarget{group__Math__util_gac437cced669a62918bdf9878f2aebaa1}{}\index{Math Utilities@{Math Utilities}!mod@{mod}}
\index{mod@{mod}!Math Utilities@{Math Utilities}}
\subsubsection[{mod}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T S\+P\+L\+::mod (
\begin{DoxyParamCaption}
\item[{T}]{x, }
\item[{T}]{y}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gac437cced669a62918bdf9878f2aebaa1}


Compute the remainder after division. 

\hypertarget{group__Math__util_ga840c71714814d55ac3f72a3b66f7d51f}{}\index{Math Utilities@{Math Utilities}!rad\+To\+Deg@{rad\+To\+Deg}}
\index{rad\+To\+Deg@{rad\+To\+Deg}!Math Utilities@{Math Utilities}}
\subsubsection[{rad\+To\+Deg}]{\setlength{\rightskip}{0pt plus 5cm}double S\+P\+L\+::rad\+To\+Deg (
\begin{DoxyParamCaption}
\item[{double}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_ga840c71714814d55ac3f72a3b66f7d51f}


Convert from radians to degrees. 

Returns\+: The quantity x converted (from radians) to degrees is returned. \hypertarget{group__Math__util_ga82eb348e0bb13f3f70ff4e42c6384981}{}\index{Math Utilities@{Math Utilities}!round\+Toward\+Zero\+Div@{round\+Toward\+Zero\+Div}}
\index{round\+Toward\+Zero\+Div@{round\+Toward\+Zero\+Div}!Math Utilities@{Math Utilities}}
\subsubsection[{round\+Toward\+Zero\+Div}]{\setlength{\rightskip}{0pt plus 5cm}long S\+P\+L\+::round\+Toward\+Zero\+Div (
\begin{DoxyParamCaption}
\item[{long}]{x, }
\item[{long}]{y}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_ga82eb348e0bb13f3f70ff4e42c6384981}


Compute a quotient with the result rounded towards zero. 

Returns\+: The floor of x divided by y is returned. \hypertarget{group__Math__util_gaf3c98127d138aa9a55dfb583bef9bcf8}{}\index{Math Utilities@{Math Utilities}!signum@{signum}}
\index{signum@{signum}!Math Utilities@{Math Utilities}}
\subsubsection[{signum}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T S\+P\+L\+::signum (
\begin{DoxyParamCaption}
\item[{T}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_gaf3c98127d138aa9a55dfb583bef9bcf8}


The signum function. 

Returns\+: The signum of the quantity x is returned. \hypertarget{group__Math__util_ga4fc2362acb83c8ba12888ab4b4ec490b}{}\index{Math Utilities@{Math Utilities}!sinc@{sinc}}
\index{sinc@{sinc}!Math Utilities@{Math Utilities}}
\subsubsection[{sinc}]{\setlength{\rightskip}{0pt plus 5cm}double S\+P\+L\+::sinc (
\begin{DoxyParamCaption}
\item[{double}]{x}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}\label{group__Math__util_ga4fc2362acb83c8ba12888ab4b4ec490b}


The cardinal sine function. 

Returns\+: The sinc of x is returned. \hypertarget{group__Math__util_gad504346219317cffc75ee0b6f2b2bc46}{}\index{Math Utilities@{Math Utilities}!sqr@{sqr}}
\index{sqr@{sqr}!Math Utilities@{Math Utilities}}
\subsubsection[{sqr}]{\setlength{\rightskip}{0pt plus 5cm}template$<$class T $>$ T S\+P\+L\+::sqr (
\begin{DoxyParamCaption}
\item[{const T \&}]{x}
\end{DoxyParamCaption}
)}\label{group__Math__util_gad504346219317cffc75ee0b6f2b2bc46}


The square function. 

Returns\+: The square of the quantity x is returned. 