\hypertarget{group__EPhysics__Quaternion}{\section{E\-Physics Quaternion}
\label{group__EPhysics__Quaternion}\index{E\-Physics Quaternion@{E\-Physics Quaternion}}
}


Quaternions are used to perform linear algebra rotations.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__EPhysics__Quaternion}{\-\_\-\-E\-Physics\-\_\-\-Quaternion}
\begin{DoxyCompactList}\small\item\em Quaternion coordinates and rotation (w, x, y, z) \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{struct__EPhysics__Quaternion}{\-\_\-\-E\-Physics\-\_\-\-Quaternion} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion}
\begin{DoxyCompactList}\small\item\em Quaternion handle, represents a quaternion to be used to rotate bodies. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$ \hyperlink{group__EPhysics__Quaternion_gac645b7642eb43181b5d27f648fb0e021}{ephysics\-\_\-quaternion\-\_\-new} (void)
\begin{DoxyCompactList}\small\item\em Create a new quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\-\_\-quaternion\-\_\-get} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double $\ast$x, double $\ast$y, double $\ast$z, double $\ast$w)
\begin{DoxyCompactList}\small\item\em Get quaternion values. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_ga22bff9e6439fccbcd5903777fcb04281}{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double $\ast$nx, double $\ast$ny, double $\ast$nz, double $\ast$a)
\begin{DoxyCompactList}\small\item\em Get quaternion axis and angle. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double x, double y, double z, double w)
\begin{DoxyCompactList}\small\item\em Set quaternion values. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_ga7c4194fd5c865c158d86697f88144b8f}{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double nx, double ny, double nz, double a)
\begin{DoxyCompactList}\small\item\em Set quaternion using axis angle notation. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double yaw, double pitch, double roll)
\begin{DoxyCompactList}\small\item\em Set quaternion using Euler angles. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gae72bd8e462318feae3636dd5f405065f}{ephysics\-\_\-quaternion\-\_\-normalize} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat)
\begin{DoxyCompactList}\small\item\em Normalize the quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gaf17766951b7ea908441d89d6a7e86ba9}{ephysics\-\_\-quaternion\-\_\-invert} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat)
\begin{DoxyCompactList}\small\item\em Invert the quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}{ephysics\-\_\-quaternion\-\_\-scale} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double scale)
\begin{DoxyCompactList}\small\item\em Scale the quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} void \hyperlink{group__EPhysics__Quaternion_gaa80165977ffa0a9ee257079306a35b26}{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale} (\hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat, double scale)
\begin{DoxyCompactList}\small\item\em Inversely scale the quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$ \hyperlink{group__EPhysics__Quaternion_ga0349fd99fa1662e792fb91a8500eb87e}{ephysics\-\_\-quaternion\-\_\-sum} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2, \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$result)
\begin{DoxyCompactList}\small\item\em Returns a sum of two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$ \hyperlink{group__EPhysics__Quaternion_gac8c3027eea2f8f57f52e5722050cfaa8}{ephysics\-\_\-quaternion\-\_\-diff} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2, \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$result)
\begin{DoxyCompactList}\small\item\em Returns a difference between two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$ \hyperlink{group__EPhysics__Quaternion_gace88a4e4700fa1a1456c852655969a19}{ephysics\-\_\-quaternion\-\_\-multiply} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2, \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$result)
\begin{DoxyCompactList}\small\item\em Multiply two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$ \hyperlink{group__EPhysics__Quaternion_ga693d7303dd0b94247beb03187ef5841a}{ephysics\-\_\-quaternion\-\_\-slerp} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2, double ratio, \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$result)
\begin{DoxyCompactList}\small\item\em Return the quaternion which is the result of Spherical Linear Interpolation between two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} double \hyperlink{group__EPhysics__Quaternion_ga0fa18d05260d0998443949da2ade006a}{ephysics\-\_\-quaternion\-\_\-dot} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2)
\begin{DoxyCompactList}\small\item\em Return the dot product between two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} double \hyperlink{group__EPhysics__Quaternion_ga23e7aa3a39029be4779d47e54651287a}{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat1, const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat2)
\begin{DoxyCompactList}\small\item\em Return the angle between two quaternions. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} double \hyperlink{group__EPhysics__Quaternion_ga31e9c326937c130ea3616223f98ca54e}{ephysics\-\_\-quaternion\-\_\-length\-\_\-get} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat)
\begin{DoxyCompactList}\small\item\em Return the length of the quaternion. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\-A\-P\-I} double \hyperlink{group__EPhysics__Quaternion_gaff4c5cdf6162b538bfe41e37595b01f2}{ephysics\-\_\-quaternion\-\_\-length2\-\_\-get} (const \hyperlink{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{E\-Physics\-\_\-\-Quaternion} $\ast$quat)
\begin{DoxyCompactList}\small\item\em Return the length squared of the quaternion. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Quaternions are used to perform linear algebra rotations. Functions regarding rotation, like \hyperlink{group__EPhysics__Body_ga11a611cba12f9066a272e5cb6d1b371e}{ephysics\-\_\-body\-\_\-rotation\-\_\-set()} and \hyperlink{group__EPhysics__Body_gaf1e13b27301a7f4c9cb3bcba3fa9f26a}{ephysics\-\_\-body\-\_\-rotation\-\_\-get()} would need that. Quaternions can be used to rotate evas maps as well, with \hyperlink{group__Evas__Object__Group__Map_ga2095fdb6ae2d2bf3548dbd7b137f139a}{evas\-\_\-map\-\_\-util\-\_\-quat\-\_\-rotate()}, but in this case quaternion values need to be get with \hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\-\_\-quaternion\-\_\-get()}, since evas don't accept E\-Physics\-\_\-\-Quaternion type.

A quaternion can be created with \hyperlink{group__EPhysics__Quaternion_gac645b7642eb43181b5d27f648fb0e021}{ephysics\-\_\-quaternion\-\_\-new()}, and many operations can be performed with that, as\-: \begin{DoxyItemize}
\item Sum\-: \hyperlink{group__EPhysics__Quaternion_ga0349fd99fa1662e792fb91a8500eb87e}{ephysics\-\_\-quaternion\-\_\-sum()} \item Difference\-: \hyperlink{group__EPhysics__Quaternion_gac8c3027eea2f8f57f52e5722050cfaa8}{ephysics\-\_\-quaternion\-\_\-diff()} \item Multiple by another quaternion\-: \hyperlink{group__EPhysics__Quaternion_gace88a4e4700fa1a1456c852655969a19}{ephysics\-\_\-quaternion\-\_\-multiply()} \item Multiply by scalar\-: \hyperlink{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}{ephysics\-\_\-quaternion\-\_\-scale()} \item Divide by scalar\-: \hyperlink{group__EPhysics__Quaternion_gaa80165977ffa0a9ee257079306a35b26}{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale()} \item Calculate length\-: \hyperlink{group__EPhysics__Quaternion_ga31e9c326937c130ea3616223f98ca54e}{ephysics\-\_\-quaternion\-\_\-length\-\_\-get()} \item Calculate angle between quaternions\-: \hyperlink{group__EPhysics__Quaternion_ga23e7aa3a39029be4779d47e54651287a}{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get()} \end{DoxyItemize}


\subsection{Typedef Documentation}
\hypertarget{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!E\-Physics\-\_\-\-Quaternion@{E\-Physics\-\_\-\-Quaternion}}
\index{E\-Physics\-\_\-\-Quaternion@{E\-Physics\-\_\-\-Quaternion}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{E\-Physics\-\_\-\-Quaternion}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-Physics\-\_\-\-Quaternion}}}\label{group__EPhysics__Quaternion_ga0a3aa92825f4a5d1feeffb07945a4bbf}


Quaternion handle, represents a quaternion to be used to rotate bodies. 

Created with \hyperlink{group__EPhysics__Quaternion_gac645b7642eb43181b5d27f648fb0e021}{ephysics\-\_\-quaternion\-\_\-new()} and deleted with free(). 

\subsection{Function Documentation}
\hypertarget{group__EPhysics__Quaternion_gac645b7642eb43181b5d27f648fb0e021}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-new@{ephysics\-\_\-quaternion\-\_\-new}}
\index{ephysics\-\_\-quaternion\-\_\-new@{ephysics\-\_\-quaternion\-\_\-new}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-new}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf E\-Physics\-\_\-\-Quaternion}$\ast$ ephysics\-\_\-quaternion\-\_\-new (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gac645b7642eb43181b5d27f648fb0e021}


Create a new quaternion. 

By default a quaternion is created as identity (w = 1, x = 0, y = 0, z = 0). This values can be modified later by quaternion operations or set directly.

\begin{DoxyReturn}{Returns}
The created quaternion or {\ttfamily N\-U\-L\-L} on error.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
It should be deleted with free() after usage is concluded.
\end{DoxyNote}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()}; 

\hyperlink{group__EPhysics__Quaternion_ga7c4194fd5c865c158d86697f88144b8f}{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set()}; 

\hyperlink{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set()}; 

\hyperlink{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}{ephysics\-\_\-quaternion\-\_\-scale()}; 

\hyperlink{group__EPhysics__Quaternion_ga0349fd99fa1662e792fb91a8500eb87e}{ephysics\-\_\-quaternion\-\_\-sum()}; 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-get@{ephysics\-\_\-quaternion\-\_\-get}}
\index{ephysics\-\_\-quaternion\-\_\-get@{ephysics\-\_\-quaternion\-\_\-get}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double $\ast$}]{x, }
\item[{double $\ast$}]{y, }
\item[{double $\ast$}]{z, }
\item[{double $\ast$}]{w}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}


Get quaternion values. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to get values from. \\
\hline
{\em x} & The x coordinate. \\
\hline
{\em y} & The y coordinate. \\
\hline
{\em z} & The z coordinate. \\
\hline
{\em w} & The rotation.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()}; 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{test_rotating_forever_8c-example}{test\-\_\-rotating\-\_\-forever.\-c}.\end{Desc}
\hypertarget{group__EPhysics__Quaternion_ga22bff9e6439fccbcd5903777fcb04281}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get@{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get}}
\index{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get@{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double $\ast$}]{nx, }
\item[{double $\ast$}]{ny, }
\item[{double $\ast$}]{nz, }
\item[{double $\ast$}]{a}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga22bff9e6439fccbcd5903777fcb04281}


Get quaternion axis and angle. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to get values from. \\
\hline
{\em nx} & The x component of the axis of rotation. \\
\hline
{\em ny} & The y component of the axis of rotation. \\
\hline
{\em nz} & The z component of the axis of rotation. \\
\hline
{\em a} & The angle of rotation.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_ga7c4194fd5c865c158d86697f88144b8f}{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set()}; 

\hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\-\_\-quaternion\-\_\-get()}; 

\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()}; 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-set@{ephysics\-\_\-quaternion\-\_\-set}}
\index{ephysics\-\_\-quaternion\-\_\-set@{ephysics\-\_\-quaternion\-\_\-set}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-set (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double}]{x, }
\item[{double}]{y, }
\item[{double}]{z, }
\item[{double}]{w}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}


Set quaternion values. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be set. \\
\hline
{\em x} & The x coordinate. \\
\hline
{\em y} & The y coordinate. \\
\hline
{\em z} & The z coordinate. \\
\hline
{\em w} & The rotation.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\-\_\-quaternion\-\_\-get()}; 

\hyperlink{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set()}; 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{test_rotating_forever_8c-example}{test\-\_\-rotating\-\_\-forever.\-c}.\end{Desc}
\hypertarget{group__EPhysics__Quaternion_ga7c4194fd5c865c158d86697f88144b8f}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set@{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set}}
\index{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set@{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-set (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double}]{nx, }
\item[{double}]{ny, }
\item[{double}]{nz, }
\item[{double}]{a}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga7c4194fd5c865c158d86697f88144b8f}


Set quaternion using axis angle notation. 

\mbox{[}w, x, y, z\mbox{]} = \mbox{[}cos(a/2), sin(a/2) $\ast$ nx, sin(a/2)$\ast$ ny, sin(a/2) $\ast$ nz\mbox{]}


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be set. \\
\hline
{\em nx} & The x component of the axis of rotation. \\
\hline
{\em ny} & The y component of the axis of rotation. \\
\hline
{\em nz} & The z component of the axis of rotation. \\
\hline
{\em a} & The angle of rotation.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_ga22bff9e6439fccbcd5903777fcb04281}{ephysics\-\_\-quaternion\-\_\-axis\-\_\-angle\-\_\-get()}; 

\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()}; 

\hyperlink{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set()}; 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-euler\-\_\-set@{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set}}
\index{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set@{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-euler\-\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-euler\-\_\-set (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double}]{yaw, }
\item[{double}]{pitch, }
\item[{double}]{roll}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gab2a5e0d699dabd39bc6cffebfea26e12}


Set quaternion using Euler angles. 

It's an alternative to \hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()} usage. Euler angles will be converted.


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be set. \\
\hline
{\em yaw} & The angle around Y axis. \\
\hline
{\em pitch} & The angle around X axis. \\
\hline
{\em roll} & The angle around Z axis.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gaab4373700e3bdad8e761e63c398ebda6}{ephysics\-\_\-quaternion\-\_\-get()}; 

\hyperlink{group__EPhysics__Quaternion_gae05800bc35b8f0d161673f167e632524}{ephysics\-\_\-quaternion\-\_\-set()}; 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_gae72bd8e462318feae3636dd5f405065f}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-normalize@{ephysics\-\_\-quaternion\-\_\-normalize}}
\index{ephysics\-\_\-quaternion\-\_\-normalize@{ephysics\-\_\-quaternion\-\_\-normalize}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-normalize}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-normalize (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gae72bd8e462318feae3636dd5f405065f}


Normalize the quaternion. 

A normalized quaternion is such that x$^\wedge$2 + y$^\wedge$2 + z$^\wedge$2 + w$^\wedge$2 = 1.


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be normalized. \\
\hline
\end{DoxyParams}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{test_rotating_forever_8c-example}{test\-\_\-rotating\-\_\-forever.\-c}.\end{Desc}
\hypertarget{group__EPhysics__Quaternion_gaf17766951b7ea908441d89d6a7e86ba9}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-invert@{ephysics\-\_\-quaternion\-\_\-invert}}
\index{ephysics\-\_\-quaternion\-\_\-invert@{ephysics\-\_\-quaternion\-\_\-invert}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-invert}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-invert (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gaf17766951b7ea908441d89d6a7e86ba9}


Invert the quaternion. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be inverted. \\
\hline
\end{DoxyParams}
\hypertarget{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-scale@{ephysics\-\_\-quaternion\-\_\-scale}}
\index{ephysics\-\_\-quaternion\-\_\-scale@{ephysics\-\_\-quaternion\-\_\-scale}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-scale}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-scale (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double}]{scale}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}


Scale the quaternion. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be scaled. \\
\hline
{\em scale} & The scale factor.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gaa80165977ffa0a9ee257079306a35b26}{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale()} 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_gaa80165977ffa0a9ee257079306a35b26}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale@{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale}}
\index{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale@{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} void ephysics\-\_\-quaternion\-\_\-inverse\-\_\-scale (
\begin{DoxyParamCaption}
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat, }
\item[{double}]{scale}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gaa80165977ffa0a9ee257079306a35b26}


Inversely scale the quaternion. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to be scaled. \\
\hline
{\em scale} & The scale factor.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See Also}
\hyperlink{group__EPhysics__Quaternion_gab1c9e099ff673f2595289ee5bc32eb05}{ephysics\-\_\-quaternion\-\_\-scale()} 
\end{DoxySeeAlso}
\hypertarget{group__EPhysics__Quaternion_ga0349fd99fa1662e792fb91a8500eb87e}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-sum@{ephysics\-\_\-quaternion\-\_\-sum}}
\index{ephysics\-\_\-quaternion\-\_\-sum@{ephysics\-\_\-quaternion\-\_\-sum}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-sum}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf E\-Physics\-\_\-\-Quaternion}$\ast$ ephysics\-\_\-quaternion\-\_\-sum (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2, }
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{result}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga0349fd99fa1662e792fb91a8500eb87e}


Returns a sum of two quaternions. 


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion to sum. \\
\hline
{\em quat2} & Second quaternion to sum. \\
\hline
{\em result} & Quaternion used to store the result. If it's {\ttfamily N\-U\-L\-L}, a new quaternion will be allocated (and should be freed after usage). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The sum quaternion or {\ttfamily N\-U\-L\-L} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_gac8c3027eea2f8f57f52e5722050cfaa8}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-diff@{ephysics\-\_\-quaternion\-\_\-diff}}
\index{ephysics\-\_\-quaternion\-\_\-diff@{ephysics\-\_\-quaternion\-\_\-diff}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-diff}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf E\-Physics\-\_\-\-Quaternion}$\ast$ ephysics\-\_\-quaternion\-\_\-diff (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2, }
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{result}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gac8c3027eea2f8f57f52e5722050cfaa8}


Returns a difference between two quaternions. 


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion. \\
\hline
{\em quat2} & Second quaternion. \\
\hline
{\em result} & Quaternion used to store the result. If it's {\ttfamily N\-U\-L\-L}, a new quaternion will be allocated (and should be freed after usage). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The difference between {\ttfamily quat1} and {\ttfamily quat2}, or {\ttfamily N\-U\-L\-L} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_gace88a4e4700fa1a1456c852655969a19}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-multiply@{ephysics\-\_\-quaternion\-\_\-multiply}}
\index{ephysics\-\_\-quaternion\-\_\-multiply@{ephysics\-\_\-quaternion\-\_\-multiply}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-multiply}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf E\-Physics\-\_\-\-Quaternion}$\ast$ ephysics\-\_\-quaternion\-\_\-multiply (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2, }
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{result}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gace88a4e4700fa1a1456c852655969a19}


Multiply two quaternions. 


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion. \\
\hline
{\em quat2} & Second quaternion. \\
\hline
{\em result} & Quaternion used to store the result. If it's {\ttfamily N\-U\-L\-L}, a new quaternion will be allocated (and should be freed after usage). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The {\ttfamily quat1} multiplied by {\ttfamily quat2} on the right, or {\ttfamily N\-U\-L\-L} on error. 
\end{DoxyReturn}
\begin{Desc}
\item[Examples\-: ]\par
\hyperlink{test_rotating_forever_8c-example}{test\-\_\-rotating\-\_\-forever.\-c}.\end{Desc}
\hypertarget{group__EPhysics__Quaternion_ga693d7303dd0b94247beb03187ef5841a}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-slerp@{ephysics\-\_\-quaternion\-\_\-slerp}}
\index{ephysics\-\_\-quaternion\-\_\-slerp@{ephysics\-\_\-quaternion\-\_\-slerp}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-slerp}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} {\bf E\-Physics\-\_\-\-Quaternion}$\ast$ ephysics\-\_\-quaternion\-\_\-slerp (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2, }
\item[{double}]{ratio, }
\item[{{\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{result}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga693d7303dd0b94247beb03187ef5841a}


Return the quaternion which is the result of Spherical Linear Interpolation between two quaternions. 

Slerp interpolates assuming constant velocity.


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion. \\
\hline
{\em quat2} & Second quaternion. \\
\hline
{\em ratio} & The ratio between {\ttfamily quat1} and {\ttfamily quat2} to interpolate. If {\ttfamily ratio} = 0, the result is {\ttfamily quat1}, if {\ttfamily ratio} = 1, the result is {\ttfamily quat2}. \\
\hline
{\em result} & Quaternion used to store the result. If it's {\ttfamily N\-U\-L\-L}, a new quaternion will be allocated (and should be freed after usage). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The result of slerp between {\ttfamily quat1} and {\ttfamily quat2}, or {\ttfamily N\-U\-L\-L} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_ga0fa18d05260d0998443949da2ade006a}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-dot@{ephysics\-\_\-quaternion\-\_\-dot}}
\index{ephysics\-\_\-quaternion\-\_\-dot@{ephysics\-\_\-quaternion\-\_\-dot}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-dot}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} double ephysics\-\_\-quaternion\-\_\-dot (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga0fa18d05260d0998443949da2ade006a}


Return the dot product between two quaternions. 


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion. \\
\hline
{\em quat2} & Second quaternion. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The dot product between {\ttfamily quat1} and {\ttfamily quat2} or {\ttfamily 0} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_ga23e7aa3a39029be4779d47e54651287a}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-angle\-\_\-get@{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get}}
\index{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get@{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-angle\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} double ephysics\-\_\-quaternion\-\_\-angle\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat1, }
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat2}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga23e7aa3a39029be4779d47e54651287a}


Return the angle between two quaternions. 


\begin{DoxyParams}{Parameters}
{\em quat1} & First quaternion. \\
\hline
{\em quat2} & Second quaternion. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The angle between {\ttfamily quat1} and {\ttfamily quat2} or {\ttfamily 0} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_ga31e9c326937c130ea3616223f98ca54e}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-length\-\_\-get@{ephysics\-\_\-quaternion\-\_\-length\-\_\-get}}
\index{ephysics\-\_\-quaternion\-\_\-length\-\_\-get@{ephysics\-\_\-quaternion\-\_\-length\-\_\-get}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-length\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} double ephysics\-\_\-quaternion\-\_\-length\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_ga31e9c326937c130ea3616223f98ca54e}


Return the length of the quaternion. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to get length of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The lenght of {\ttfamily quat} or {\ttfamily 0} on error. 
\end{DoxyReturn}
\hypertarget{group__EPhysics__Quaternion_gaff4c5cdf6162b538bfe41e37595b01f2}{\index{E\-Physics Quaternion@{E\-Physics Quaternion}!ephysics\-\_\-quaternion\-\_\-length2\-\_\-get@{ephysics\-\_\-quaternion\-\_\-length2\-\_\-get}}
\index{ephysics\-\_\-quaternion\-\_\-length2\-\_\-get@{ephysics\-\_\-quaternion\-\_\-length2\-\_\-get}!EPhysics Quaternion@{E\-Physics Quaternion}}
\subsubsection[{ephysics\-\_\-quaternion\-\_\-length2\-\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}{\bf E\-A\-P\-I} double ephysics\-\_\-quaternion\-\_\-length2\-\_\-get (
\begin{DoxyParamCaption}
\item[{const {\bf E\-Physics\-\_\-\-Quaternion} $\ast$}]{quat}
\end{DoxyParamCaption}
)}}\label{group__EPhysics__Quaternion_gaff4c5cdf6162b538bfe41e37595b01f2}


Return the length squared of the quaternion. 


\begin{DoxyParams}{Parameters}
{\em quat} & Quaternion to get length of. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The lenght of {\ttfamily quat} or {\ttfamily 0} on error. 
\end{DoxyReturn}
