\section{aversive\_\-10-03-12/modules/base/math/vect2/vect2.h File Reference}
\label{vect2_8h}\index{aversive\_\-10-03-12/modules/base/math/vect2/vect2.h@{aversive\_\-10-03-12/modules/base/math/vect2/vect2.h}}
Interface for the 2 dimensional vector module. 

\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf \_\-vect2\_\-cart}
\begin{CompactList}\small\item\em Cartesian vector structure. \item\end{CompactList}\item 
struct {\bf \_\-vect2\_\-pol}
\begin{CompactList}\small\item\em Polar vector structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf TO\_\-RAD}(x)~(((double)x)$\ast$(M\_\-PI/180.0))
\item 
\#define {\bf TO\_\-DEG}(x)~(((double)x)$\ast$(180.0/M\_\-PI))
\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
typedef double {\bf Real}
\begin{CompactList}\small\item\em Definition of reals used in vector 2d. \item\end{CompactList}\item 
typedef struct {\bf \_\-vect2\_\-cart} {\bf vect2\_\-cart}
\begin{CompactList}\small\item\em Cartesian vector structure. \item\end{CompactList}\item 
typedef struct {\bf \_\-vect2\_\-pol} {\bf vect2\_\-pol}
\begin{CompactList}\small\item\em Polar vector structure. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf vect2\_\-pol2cart} ({\bf vect2\_\-pol} $\ast$vp, {\bf vect2\_\-cart} $\ast$vc)
\begin{CompactList}\small\item\em Convert a polar vector to a cartesian one. \item\end{CompactList}\item 
void {\bf vect2\_\-cart2pol} ({\bf vect2\_\-cart} $\ast$vc, {\bf vect2\_\-pol} $\ast$vp)
\begin{CompactList}\small\item\em Convert a cartesian vector to a polar one. \item\end{CompactList}\item 
void {\bf vect2\_\-add\_\-pol} ({\bf vect2\_\-pol} $\ast$v1, {\bf vect2\_\-pol} $\ast$v2, {\bf vect2\_\-pol} $\ast$vresult)
\begin{CompactList}\small\item\em Add 2 polar vectors and return the result. \item\end{CompactList}\item 
void {\bf vect2\_\-add\_\-cart} ({\bf vect2\_\-cart} $\ast$v1, {\bf vect2\_\-cart} $\ast$v2, {\bf vect2\_\-cart} $\ast$vresult)
\begin{CompactList}\small\item\em Add 2 cartesian vectors and return the result. \item\end{CompactList}\item 
void {\bf vect2\_\-sub\_\-pol} ({\bf vect2\_\-pol} $\ast$v1, {\bf vect2\_\-pol} $\ast$v2, {\bf vect2\_\-pol} $\ast$vresult)
\begin{CompactList}\small\item\em Substract 2 polar vectors and return the result. \item\end{CompactList}\item 
void {\bf vect2\_\-sub\_\-cart} ({\bf vect2\_\-cart} $\ast$v1, {\bf vect2\_\-cart} $\ast$v2, {\bf vect2\_\-cart} $\ast$vresult)
\begin{CompactList}\small\item\em Substract 2 cartesian vectors and return the result. \item\end{CompactList}\item 
void {\bf vect2\_\-scale\_\-cart} ({\bf vect2\_\-cart} $\ast$v1, {\bf Real} alpha, {\bf vect2\_\-cart} $\ast$vresult)
\begin{CompactList}\small\item\em Multiply a cartesian vector by a scalar and return the result. \item\end{CompactList}\item 
void {\bf vect2\_\-scale\_\-pol} ({\bf vect2\_\-pol} $\ast$v1, {\bf Real} alpha, {\bf vect2\_\-pol} $\ast$vresult)
\begin{CompactList}\small\item\em Multiply a polar vector by a scalar and return the result. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Interface for the 2 dimensional vector module. 

\begin{Desc}
\item[Author:]JD \& Vincent \end{Desc}
\begin{Desc}
\item[Version:]2.0 \end{Desc}
\begin{Desc}
\item[Date:]21.12.2005 @ 23:09 \end{Desc}
\begin{Desc}
\item[{\bf Todo}]Complex operations on vectors and implementation of the $<$french$>$ reperes $<$/french$>$ \end{Desc}
\begin{Desc}
\item[{\bf Test}]polar -$>$ cartesian \& cartesian -$>$ polar seems to be ok.\end{Desc}
This module provides functions to handle 2d vectors and basic geometry fucntions. 

Definition in file {\bf vect2.h}.

\subsection{Define Documentation}
\index{vect2.h@{vect2.h}!TO\_\-DEG@{TO\_\-DEG}}
\index{TO\_\-DEG@{TO\_\-DEG}!vect2.h@{vect2.h}}
\subsubsection[TO\_\-DEG]{\setlength{\rightskip}{0pt plus 5cm}\#define TO\_\-DEG(x)~(((double)x)$\ast$(180.0/M\_\-PI))}\label{vect2_8h_847e0dd5ce74f31a4cd86dac97a9713c}




Definition at line 42 of file vect2.h.\index{vect2.h@{vect2.h}!TO\_\-RAD@{TO\_\-RAD}}
\index{TO\_\-RAD@{TO\_\-RAD}!vect2.h@{vect2.h}}
\subsubsection[TO\_\-RAD]{\setlength{\rightskip}{0pt plus 5cm}\#define TO\_\-RAD(x)~(((double)x)$\ast$(M\_\-PI/180.0))}\label{vect2_8h_a6e50afea72fd680a43859ea86e692be}




Definition at line 41 of file vect2.h.

\subsection{Typedef Documentation}
\index{vect2.h@{vect2.h}!Real@{Real}}
\index{Real@{Real}!vect2.h@{vect2.h}}
\subsubsection[Real]{\setlength{\rightskip}{0pt plus 5cm}typedef double {\bf Real}}\label{vect2_8h_445a5f0e2a34c9d97d69a3c2d1957907}


Definition of reals used in vector 2d. 

 

Definition at line 39 of file vect2.h.\index{vect2.h@{vect2.h}!vect2\_\-cart@{vect2\_\-cart}}
\index{vect2\_\-cart@{vect2\_\-cart}!vect2.h@{vect2.h}}
\subsubsection[vect2\_\-cart]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf \_\-vect2\_\-cart} {\bf vect2\_\-cart}}\label{vect2_8h_38af9a7a71bc3c7cf7ec5a9c7850056d}


Cartesian vector structure. 

\index{vect2.h@{vect2.h}!vect2\_\-pol@{vect2\_\-pol}}
\index{vect2\_\-pol@{vect2\_\-pol}!vect2.h@{vect2.h}}
\subsubsection[vect2\_\-pol]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf \_\-vect2\_\-pol} {\bf vect2\_\-pol}}\label{vect2_8h_fd8a2583c89f4fc4d6d30be51bf330ba}


Polar vector structure. 

