\hypertarget{TinyMath_8hpp_source}{}\doxysection{Tiny\+Math.\+hpp}
\label{TinyMath_8hpp_source}\index{include/TinyMath.hpp@{include/TinyMath.hpp}}

\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{preprocessor}{\#ifndef\ TINYMATH\_HPP}}
\DoxyCodeLine{00002\ \textcolor{preprocessor}{\#define\ TINYMATH\_HPP}}
\DoxyCodeLine{00003\ }
\DoxyCodeLine{00004\ \textcolor{preprocessor}{\#include\ <cmath>}}
\DoxyCodeLine{00005\ \textcolor{preprocessor}{\#include\ <ostream>}}
\DoxyCodeLine{00006\ }
\DoxyCodeLine{00007\ \textcolor{comment}{//\ Forward\ references\ of\ each\ of\ the\ structs}}
\DoxyCodeLine{00008\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structVec2D}{Vec2D}};}
\DoxyCodeLine{00009\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structMatrix3D}{Matrix3D}};}
\DoxyCodeLine{00010\ }
\DoxyCodeLine{00011\ \textcolor{comment}{//\ Vec2D\ performs\ vector\ operations\ with\ 3-\/dimensions}}
\DoxyCodeLine{00012\ \textcolor{comment}{//\ The\ purpose\ of\ this\ class\ is\ primarily\ for\ 3D\ graphics}}
\DoxyCodeLine{00013\ \textcolor{comment}{//\ applications.}}
\DoxyCodeLine{00014\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structVec2D}{Vec2D}}\ \{}
\DoxyCodeLine{00015\ }
\DoxyCodeLine{00016\ \ \ \ \ \textcolor{comment}{//\ I'm\ wrapping\ all\ of\ our\ member\ variables\ in\ a\ union.}}
\DoxyCodeLine{00017\ \ \ \ \ \textcolor{comment}{//\ So\ long\ as\ you\ make\ sure\ the\ byte-\/size\ is\ equivalent,\ this}}
\DoxyCodeLine{00018\ \ \ \ \ \textcolor{comment}{//\ allows\ you\ to\ access\ the\ data\ in\ whatever\ form\ is\ most\ convenient.}}
\DoxyCodeLine{00019\ \ \ \ \ \textcolor{comment}{//\ Meaning\ I\ can\ access\ Vec2D[0]\ or\ equivalently\ Vec2D.x\ .}}
\DoxyCodeLine{00020\ \ \ \ \ \textcolor{comment}{//\ I\ can\ also\ pass\ Vec2D\ internal\ array\ or\ just\ individual\ values\ if\ needed\ conveniently.}}
\DoxyCodeLine{00021\ \ \ \ \ \textcolor{keyword}{union\ }\{}
\DoxyCodeLine{00022\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }\{}
\DoxyCodeLine{00023\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Note:\ x,y\ are\ a\ convention}}
\DoxyCodeLine{00024\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ x,y\ could\ be\ position,\ but\ also\ any\ 2-\/component\ value.}}
\DoxyCodeLine{00025\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ x;}
\DoxyCodeLine{00026\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ y;}
\DoxyCodeLine{00027\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ w;\ \textcolor{comment}{//\ 'w'\ is\ a\ third\ hidden\ component\ that\ could\ be\ used}}
\DoxyCodeLine{00028\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ to\ determine\ if\ this\ is\ being\ used\ as\ a\ vector\ or\ a\ point}}
\DoxyCodeLine{00029\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ If\ w=0\ then\ a\ vector,\ if\ w=1\ then\ a\ point}}
\DoxyCodeLine{00030\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ DO\ not\ use\ 'w'\ for\ any\ computation\ however.}}
\DoxyCodeLine{00031\ \ \ \ \ \ \ \ \ \};}
\DoxyCodeLine{00032\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ data[3];\ \textcolor{comment}{//\ for\ convenience\ if\ you\ want\ to\ access\ as\ 'data'\ or\ pass\ Vec2D\ as\ an\ array}}
\DoxyCodeLine{00033\ \ \ \ \ \};}
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \ \ \ \ \textcolor{comment}{//\ Default\ conostrutcor}}
\DoxyCodeLine{00036\ \ \ \ \ \textcolor{comment}{//\ 'why\ default?'\ https://stackoverflow.com/questions/20828907/the-\/new-\/keyword-\/default-\/in-\/c11}}
\DoxyCodeLine{00037\ \ \ \ \ \textcolor{comment}{//\ \ \ \ Vec2D()\ =\ default;}}
\DoxyCodeLine{00038\ }
\DoxyCodeLine{00039\ \ \ \ \ \textcolor{comment}{//\ The\ "{}Real"{}\ constructor\ we\ want\ to\ use.}}
\DoxyCodeLine{00040\ \ \ \ \ \textcolor{comment}{//\ This\ initializes\ the\ values\ x,y,\ and\ the\ 'w'\ value}}
\DoxyCodeLine{00041\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}(\textcolor{keywordtype}{float}\ \_x\ =\ 0,\ \textcolor{keywordtype}{float}\ \_y\ =\ 0,\ \textcolor{keywordtype}{float}\ \_w\ =\ 0)\ \{}
\DoxyCodeLine{00042\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00043\ \ \ \ \ \ \ \ \ x\ =\ \_x;}
\DoxyCodeLine{00044\ \ \ \ \ \ \ \ \ y\ =\ \_y;}
\DoxyCodeLine{00045\ \ \ \ \ \ \ \ \ w\ =\ \_w;}
\DoxyCodeLine{00046\ \ \ \ \ \}}
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00048\ \ \ \ \ \textcolor{comment}{//\ Index\ operator,\ allowing\ us\ to\ access\ the\ individual}}
\DoxyCodeLine{00049\ \ \ \ \ \textcolor{comment}{//\ x,y\ components\ of\ our\ vector.}}
\DoxyCodeLine{00050\ \ \ \ \ \textcolor{keywordtype}{float}\ \&operator[](\textcolor{keywordtype}{int}\ i)\ \{}
\DoxyCodeLine{00051\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ NOTE:\ Think\ about\ why\ this\ works.}}
\DoxyCodeLine{00052\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ There\ is\ no\ code\ to\ change\ here.}}
\DoxyCodeLine{00053\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ((\&x)[i]);}
\DoxyCodeLine{00054\ \ \ \ \ \}}
\DoxyCodeLine{00055\ }
\DoxyCodeLine{00056\ \ \ \ \ \textcolor{comment}{//\ Index\ operator,\ allowing\ us\ to\ access\ the\ individual}}
\DoxyCodeLine{00057\ \ \ \ \ \textcolor{comment}{//\ x,y\ components\ of\ our\ vector.}}
\DoxyCodeLine{00058\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \&operator[](\textcolor{keywordtype}{int}\ i)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{00059\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ NOTE:\ Think\ about\ why\ this\ works.}}
\DoxyCodeLine{00060\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ \ \ \ \ \ \ There\ is\ no\ code\ to\ change\ here.}}
\DoxyCodeLine{00061\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ ((\&x)[i]);}
\DoxyCodeLine{00062\ \ \ \ \ \}}
\DoxyCodeLine{00063\ }
\DoxyCodeLine{00064\ \ \ \ \ \textcolor{comment}{//\ General\ Note}}
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{comment}{//\ You'll\ observer\ that\ some\ of\ the\ operator\ overloads\ appear\ in\ this\ class}}
\DoxyCodeLine{00066\ \ \ \ \ \textcolor{comment}{//\ as\ member\ functions\ versus\ some\ that\ are\ free\ functions.}}
\DoxyCodeLine{00067\ \ \ \ \ \textcolor{comment}{//\ In\ general,\ if\ you\ need\ access\ to\ private\ member\ variables\ or\ the\ 'this'\ pointer}}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{comment}{//\ then\ you\ must\ use\ a\ member\ function.\ Otherwise,\ I\ recommend\ to\ 'free\ your\ functions'}}
\DoxyCodeLine{00069\ \ \ \ \ \textcolor{comment}{//\ and\ not\ make\ them\ part\ of\ the\ class\ for\ maximum\ use.}}
\DoxyCodeLine{00070\ \ \ \ \ \textcolor{comment}{//}}
\DoxyCodeLine{00071\ \ \ \ \ \textcolor{comment}{//\ Multiplication\ Operator}}
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{comment}{//\ Multiply\ vector\ by\ a\ uniform-\/scalar.}}
\DoxyCodeLine{00073\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator*=(\textcolor{keywordtype}{float}\ s)\ \{}
\DoxyCodeLine{00074\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00075\ \ \ \ \ \ \ \ \ x\ *=\ s;}
\DoxyCodeLine{00076\ \ \ \ \ \ \ \ \ y\ *=\ s;}
\DoxyCodeLine{00077\ }
\DoxyCodeLine{00078\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{this});}
\DoxyCodeLine{00079\ \ \ \ \ \}}
\DoxyCodeLine{00080\ }
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{comment}{//\ Division\ Operator}}
\DoxyCodeLine{00082\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator/=(\textcolor{keywordtype}{float}\ s)\ \{}
\DoxyCodeLine{00083\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00084\ \ \ \ \ \ \ \ \ x\ /=\ s;}
\DoxyCodeLine{00085\ \ \ \ \ \ \ \ \ y\ /=\ s;}
\DoxyCodeLine{00086\ }
\DoxyCodeLine{00087\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{this});}
\DoxyCodeLine{00088\ \ \ \ \ \}}
\DoxyCodeLine{00089\ }
\DoxyCodeLine{00090\ \ \ \ \ \textcolor{comment}{//\ Addition\ operator}}
\DoxyCodeLine{00091\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator+=(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00092\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00093\ \ \ \ \ \ \ \ \ x\ +=\ v.x;}
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ y\ +=\ v.y;}
\DoxyCodeLine{00095\ }
\DoxyCodeLine{00096\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{this});}
\DoxyCodeLine{00097\ \ \ \ \ \}}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \ \ \ \ \textcolor{comment}{//\ Subtraction\ operator}}
\DoxyCodeLine{00100\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator-\/=(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00101\ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00102\ \ \ \ \ \ \ \ \ x\ -\/=\ v.x;}
\DoxyCodeLine{00103\ \ \ \ \ \ \ \ \ y\ -\/=\ v.y;}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{this});}
\DoxyCodeLine{00106\ \ \ \ \ \}}
\DoxyCodeLine{00107\ \};}
\DoxyCodeLine{00108\ }
\DoxyCodeLine{00109\ \textcolor{comment}{//\ Compute\ the\ dot\ product\ of\ a\ Vec2D}}
\DoxyCodeLine{00110\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ Dot(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b)\ \{}
\DoxyCodeLine{00111\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keywordflow}{return}\ a.x\ *\ b.x\ +\ a.y\ *\ b.y\ +\ a.w\ *\ b.w;}
\DoxyCodeLine{00113\ \}}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00115\ \textcolor{comment}{/*}}
\DoxyCodeLine{00116\ \textcolor{comment}{//\ Test\ for\ equality}}
\DoxyCodeLine{00117\ \textcolor{comment}{//\ NOTE:\ Comparing\ floats\ is\ somewhat\ tricky,\ meaning\ that}}
\DoxyCodeLine{00118\ \textcolor{comment}{//\ \ \ \ \ \ \ you\ will\ want\ to\ take\ the\ fabs(lhs.x\ -\/\ lhs.y)\ <\ 0.00001}}
\DoxyCodeLine{00119\ \textcolor{comment}{//\ \ \ \ \ \ \ of\ each\ component\ to\ see\ if\ they\ are\ 'close\ enough'}}
\DoxyCodeLine{00120\ \textcolor{comment}{bool\ operator==(Vec2D\ \&lhs,\ Vec2D\ \&rhs)}}
\DoxyCodeLine{00121\ \textcolor{comment}{\{}}
\DoxyCodeLine{00122\ \textcolor{comment}{\ \ bool\ result\ =\ true;}}
\DoxyCodeLine{00123\ \textcolor{comment}{\ \ //\ TODO}}
\DoxyCodeLine{00124\ \textcolor{comment}{\ \ if\ (fabs(lhs.x\ -\/\ rhs.x)\ >\ 0.00001\ ||\ fabs(lhs.y\ -\/\ rhs.y)\ >\ 0.00001\ ||\ fabs(lhs.w\ -\/\ rhs.w)\ >\ 0.00001)}}
\DoxyCodeLine{00125\ \textcolor{comment}{\ \ \{}}
\DoxyCodeLine{00126\ \textcolor{comment}{\ \ \ \ result\ =\ false;}}
\DoxyCodeLine{00127\ \textcolor{comment}{\ \ \}}}
\DoxyCodeLine{00128\ \textcolor{comment}{\ \ return\ result;}}
\DoxyCodeLine{00129\ \textcolor{comment}{\}}}
\DoxyCodeLine{00130\ \textcolor{comment}{*/}}
\DoxyCodeLine{00131\ }
\DoxyCodeLine{00132\ \textcolor{comment}{//\ Multiplication\ of\ a\ vector\ by\ a\ scalar\ values}}
\DoxyCodeLine{00133\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator*(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v,\ \textcolor{keywordtype}{float}\ s)\ \{}
\DoxyCodeLine{00134\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00135\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00136\ }
\DoxyCodeLine{00137\ \ \ \ \ vec.x\ =\ v.x\ *\ s;}
\DoxyCodeLine{00138\ \ \ \ \ vec.y\ =\ v.y\ *\ s;}
\DoxyCodeLine{00139\ \ \ \ \ vec.w\ =\ v.w;}
\DoxyCodeLine{00140\ }
\DoxyCodeLine{00141\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00142\ \}}
\DoxyCodeLine{00143\ }
\DoxyCodeLine{00144\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator*(\textcolor{keywordtype}{float}\ s,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00145\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00146\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00147\ }
\DoxyCodeLine{00148\ \ \ \ \ vec.x\ =\ v.x\ *\ s;}
\DoxyCodeLine{00149\ \ \ \ \ vec.y\ =\ v.y\ *\ s;}
\DoxyCodeLine{00150\ \ \ \ \ vec.w\ =\ v.w;}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00153\ \}}
\DoxyCodeLine{00154\ }
\DoxyCodeLine{00155\ \textcolor{comment}{//\ Division\ of\ a\ vector\ by\ a\ scalar\ value.}}
\DoxyCodeLine{00156\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator/(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v,\ \textcolor{keywordtype}{float}\ s)\ \{}
\DoxyCodeLine{00157\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00158\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00159\ }
\DoxyCodeLine{00160\ \ \ \ \ vec.x\ =\ v.x\ /\ s;}
\DoxyCodeLine{00161\ \ \ \ \ vec.y\ =\ v.y\ /\ s;}
\DoxyCodeLine{00162\ \ \ \ \ vec.w\ =\ v.w;}
\DoxyCodeLine{00163\ }
\DoxyCodeLine{00164\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00165\ \}}
\DoxyCodeLine{00166\ }
\DoxyCodeLine{00167\ \textcolor{comment}{//\ Negation\ of\ a\ vector}}
\DoxyCodeLine{00168\ \textcolor{comment}{//\ Use\ Case:\ Sometimes\ it\ is\ handy\ to\ apply\ a\ force\ in\ an\ opposite\ direction}}
\DoxyCodeLine{00169\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator-\/(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00170\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00171\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00172\ }
\DoxyCodeLine{00173\ \ \ \ \ vec.x\ =\ v.x\ *\ -\/1.0f;}
\DoxyCodeLine{00174\ \ \ \ \ vec.y\ =\ v.y\ *\ -\/1.0f;}
\DoxyCodeLine{00175\ \ \ \ \ vec.w\ =\ v.w;}
\DoxyCodeLine{00176\ }
\DoxyCodeLine{00177\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00178\ \}}
\DoxyCodeLine{00179\ }
\DoxyCodeLine{00180\ \textcolor{comment}{//\ Return\ the\ magnitude\ of\ a\ vector}}
\DoxyCodeLine{00181\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ Magnitude(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00182\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00183\ \ \ \ \ \textcolor{keywordflow}{return}\ sqrt(v.x\ *\ v.x\ +\ v.y\ *\ v.y);}
\DoxyCodeLine{00184\ \}}
\DoxyCodeLine{00185\ }
\DoxyCodeLine{00186\ \textcolor{comment}{//\ Add\ two\ vectors\ together}}
\DoxyCodeLine{00187\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator+(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b)\ \{}
\DoxyCodeLine{00188\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00189\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00190\ }
\DoxyCodeLine{00191\ \ \ \ \ vec.x\ =\ a.x\ +\ b.x;}
\DoxyCodeLine{00192\ \ \ \ \ vec.y\ =\ a.y\ +\ b.y;}
\DoxyCodeLine{00193\ \ \ \ \ \textcolor{comment}{//?}}
\DoxyCodeLine{00194\ \ \ \ \ vec.w\ =\ a.w;}
\DoxyCodeLine{00195\ }
\DoxyCodeLine{00196\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00197\ \}}
\DoxyCodeLine{00198\ }
\DoxyCodeLine{00199\ \textcolor{comment}{//\ Subtract\ two\ vectors}}
\DoxyCodeLine{00200\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ operator-\/(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b)\ \{}
\DoxyCodeLine{00201\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00202\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00203\ }
\DoxyCodeLine{00204\ \ \ \ \ vec.x\ =\ a.x\ -\/\ b.x;}
\DoxyCodeLine{00205\ \ \ \ \ vec.y\ =\ a.y\ -\/\ b.y;}
\DoxyCodeLine{00206\ \ \ \ \ \textcolor{comment}{//?}}
\DoxyCodeLine{00207\ \ \ \ \ vec.w\ =\ a.w;}
\DoxyCodeLine{00208\ }
\DoxyCodeLine{00209\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00210\ \}}
\DoxyCodeLine{00211\ }
\DoxyCodeLine{00212\ \textcolor{comment}{//\ Vector\ Projection}}
\DoxyCodeLine{00213\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ Project(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b)\ \{}
\DoxyCodeLine{00214\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00215\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00216\ }
\DoxyCodeLine{00217\ \ \ \ \ \textcolor{keywordflow}{return}\ b\ *\ (float)\ (Dot(a,\ b)\ /\ (float)\ pow(Magnitude(b),\ 2));}
\DoxyCodeLine{00218\ \}}
\DoxyCodeLine{00219\ }
\DoxyCodeLine{00220\ \textcolor{comment}{//\ Set\ a\ vectors\ magnitude\ to\ 1}}
\DoxyCodeLine{00221\ \textcolor{comment}{//\ Note:\ This\ is\ NOT\ generating\ a\ normal\ vector}}
\DoxyCodeLine{00222\ \textcolor{keyword}{inline}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ Normalize(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&v)\ \{}
\DoxyCodeLine{00223\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00224\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ vec;}
\DoxyCodeLine{00225\ }
\DoxyCodeLine{00226\ \ \ \ \ \textcolor{keywordtype}{float}\ mag\ =\ Magnitude(v);}
\DoxyCodeLine{00227\ \ \ \ \ vec.x\ =\ v.x\ /\ mag;}
\DoxyCodeLine{00228\ \ \ \ \ vec.y\ =\ v.y\ /\ mag;}
\DoxyCodeLine{00229\ \ \ \ \ vec.w\ =\ v.w;}
\DoxyCodeLine{00230\ }
\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keywordflow}{return}\ vec;}
\DoxyCodeLine{00232\ \}}
\DoxyCodeLine{00233\ }
\DoxyCodeLine{00234\ \textcolor{comment}{//\ a\ x\ b\ (read:\ 'a\ crossed\ b')}}
\DoxyCodeLine{00235\ \textcolor{comment}{//\ With\ a\ 3D\ vector\ we\ would\ yield\ another\ perpendicular\ cross\ product}}
\DoxyCodeLine{00236\ \textcolor{comment}{//\ For\ 2D\ cross\ product,\ this\ will\ yield\ a\ scalar.}}
\DoxyCodeLine{00237\ \textcolor{comment}{//\ You\ should\ write\ this\ to\ yield\ a\ scalar\ value.}}
\DoxyCodeLine{00238\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{float}\ CrossProduct(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b)\ \{}
\DoxyCodeLine{00239\ \ \ \ \ \textcolor{comment}{//\ TODO:}}
\DoxyCodeLine{00240\ \ \ \ \ \textcolor{keywordtype}{float}\ result;}
\DoxyCodeLine{00241\ }
\DoxyCodeLine{00242\ \ \ \ \ result\ =\ a.x\ *\ b.y\ -\/\ b.x\ *\ a.y;}
\DoxyCodeLine{00243\ }
\DoxyCodeLine{00244\ \ \ \ \ \textcolor{keywordflow}{return}\ result;}
\DoxyCodeLine{00245\ \}}
\DoxyCodeLine{00246\ }
\DoxyCodeLine{00247\ \textcolor{comment}{//\ Pretty\ print\ a\ vector}}
\DoxyCodeLine{00248\ \textcolor{comment}{//\ std::ostream\&\ could\ be\ 'std::cout'\ for\ example'}}
\DoxyCodeLine{00249\ \textcolor{comment}{//\ This\ function\ is\ primarily\ used\ for\ debugging\ purposes}}
\DoxyCodeLine{00250\ \textcolor{keyword}{inline}\ \textcolor{keywordtype}{void}\ PrettyPrint(std::ostream\ \&os,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a)\ \{}
\DoxyCodeLine{00251\ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}x\ \ :\ "{}}\ <<\ a.x\ <<\ std::endl;}
\DoxyCodeLine{00252\ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}y\ \ :\ "{}}\ <<\ a.y\ <<\ std::endl;}
\DoxyCodeLine{00253\ \ \ \ \ os\ <<\ \textcolor{stringliteral}{"{}(w):\ "{}}\ <<\ a.w\ <<\ std::endl;}
\DoxyCodeLine{00254\ \}}
\DoxyCodeLine{00255\ }
\DoxyCodeLine{00256\ \textcolor{comment}{//\ Matrix\ 3D\ represents\ 3x3\ matrices\ in\ Math}}
\DoxyCodeLine{00257\ \textcolor{keyword}{struct\ }\mbox{\hyperlink{structMatrix3D}{Matrix3D}}\ \{}
\DoxyCodeLine{00258\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00259\ \ \ \ \ \textcolor{keywordtype}{float}\ n[3][3];\ \textcolor{comment}{//\ Store\ each\ value\ of\ the\ matrix}}
\DoxyCodeLine{00260\ }
\DoxyCodeLine{00261\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00262\ \ \ \ \ \textcolor{comment}{//\ Initializes\ to\ a\ identity\ matrix\ by\ default}}
\DoxyCodeLine{00263\ \ \ \ \ \mbox{\hyperlink{structMatrix3D}{Matrix3D}}()\ \{}
\DoxyCodeLine{00264\ \ \ \ \ \ \ \ \ n[0][0]\ =\ 1;}
\DoxyCodeLine{00265\ \ \ \ \ \ \ \ \ n[0][1]\ =\ 0;}
\DoxyCodeLine{00266\ \ \ \ \ \ \ \ \ n[0][2]\ =\ 0;}
\DoxyCodeLine{00267\ \ \ \ \ \ \ \ \ n[1][0]\ =\ 0;}
\DoxyCodeLine{00268\ \ \ \ \ \ \ \ \ n[1][1]\ =\ 1;}
\DoxyCodeLine{00269\ \ \ \ \ \ \ \ \ n[1][2]\ =\ 0;}
\DoxyCodeLine{00270\ \ \ \ \ \ \ \ \ n[2][0]\ =\ 0;}
\DoxyCodeLine{00271\ \ \ \ \ \ \ \ \ n[2][1]\ =\ 0;}
\DoxyCodeLine{00272\ \ \ \ \ \ \ \ \ n[2][2]\ =\ 1;}
\DoxyCodeLine{00273\ \ \ \ \ \}}
\DoxyCodeLine{00274\ }
\DoxyCodeLine{00275\ \ \ \ \ \textcolor{comment}{//\ TODO:\ Row\ or\ column\ major\ order\ you\ decide!}}
\DoxyCodeLine{00276\ \ \ \ \ \textcolor{comment}{//\ Matrix\ constructor\ with\ 9\ scalar\ values.}}
\DoxyCodeLine{00277\ \ \ \ \ \mbox{\hyperlink{structMatrix3D}{Matrix3D}}(\textcolor{keywordtype}{float}\ n00,\ \textcolor{keywordtype}{float}\ n01,\ \textcolor{keywordtype}{float}\ n02,}
\DoxyCodeLine{00278\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ n10,\ \textcolor{keywordtype}{float}\ n11,\ \textcolor{keywordtype}{float}\ n12,}
\DoxyCodeLine{00279\ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{float}\ n20,\ \textcolor{keywordtype}{float}\ n21,\ \textcolor{keywordtype}{float}\ n22)\ \{}
\DoxyCodeLine{00280\ }
\DoxyCodeLine{00281\ \ \ \ \ \ \ \ \ n[0][0]\ =\ n00;}
\DoxyCodeLine{00282\ \ \ \ \ \ \ \ \ n[0][1]\ =\ n01;}
\DoxyCodeLine{00283\ \ \ \ \ \ \ \ \ n[0][2]\ =\ n02;}
\DoxyCodeLine{00284\ \ \ \ \ \ \ \ \ n[1][0]\ =\ n10;}
\DoxyCodeLine{00285\ \ \ \ \ \ \ \ \ n[1][1]\ =\ n11;}
\DoxyCodeLine{00286\ \ \ \ \ \ \ \ \ n[1][2]\ =\ n12;}
\DoxyCodeLine{00287\ \ \ \ \ \ \ \ \ n[2][0]\ =\ n20;}
\DoxyCodeLine{00288\ \ \ \ \ \ \ \ \ n[2][1]\ =\ n21;}
\DoxyCodeLine{00289\ \ \ \ \ \ \ \ \ n[2][2]\ =\ n22;}
\DoxyCodeLine{00290\ \ \ \ \ \}}
\DoxyCodeLine{00291\ }
\DoxyCodeLine{00292\ \ \ \ \ \textcolor{comment}{//\ Matrix\ constructor\ from\ three\ vectors.}}
\DoxyCodeLine{00293\ \ \ \ \ \mbox{\hyperlink{structMatrix3D}{Matrix3D}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&a,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&b,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&c)\ \{}
\DoxyCodeLine{00294\ \ \ \ \ \ \ \ \ n[0][0]\ =\ a.x;}
\DoxyCodeLine{00295\ \ \ \ \ \ \ \ \ n[0][1]\ =\ a.y;}
\DoxyCodeLine{00296\ \ \ \ \ \ \ \ \ n[0][2]\ =\ a.w;}
\DoxyCodeLine{00297\ \ \ \ \ \ \ \ \ n[1][0]\ =\ b.x;}
\DoxyCodeLine{00298\ \ \ \ \ \ \ \ \ n[1][1]\ =\ b.y;}
\DoxyCodeLine{00299\ \ \ \ \ \ \ \ \ n[1][2]\ =\ b.w;}
\DoxyCodeLine{00300\ \ \ \ \ \ \ \ \ n[2][0]\ =\ c.x;}
\DoxyCodeLine{00301\ \ \ \ \ \ \ \ \ n[2][1]\ =\ c.y;}
\DoxyCodeLine{00302\ \ \ \ \ \ \ \ \ n[2][2]\ =\ c.w;}
\DoxyCodeLine{00303\ \ \ \ \ \}}
\DoxyCodeLine{00304\ }
\DoxyCodeLine{00305\ \ \ \ \ \textcolor{comment}{//\ Index\ operator\ with\ two\ dimensions}}
\DoxyCodeLine{00306\ \ \ \ \ \textcolor{comment}{//\ Example:\ M(1,1)\ returns\ row\ 1\ and\ column\ 1\ of\ matrix\ M.}}
\DoxyCodeLine{00307\ \ \ \ \ \textcolor{keywordtype}{float}\ \&operator()(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\ \{}
\DoxyCodeLine{00308\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (n[i][j]);}
\DoxyCodeLine{00309\ \ \ \ \ \}}
\DoxyCodeLine{00310\ }
\DoxyCodeLine{00311\ \ \ \ \ \textcolor{comment}{//\ Index\ operator\ with\ two\ dimensions}}
\DoxyCodeLine{00312\ \ \ \ \ \textcolor{comment}{//\ Example:\ M(1,1)\ returns\ row\ 1\ and\ column\ 1\ of\ matrix\ M.}}
\DoxyCodeLine{00313\ \ \ \ \ \textcolor{keyword}{const}\ \textcolor{keywordtype}{float}\ \&operator()(\textcolor{keywordtype}{int}\ i,\ \textcolor{keywordtype}{int}\ j)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{00314\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (n[i][j]);}
\DoxyCodeLine{00315\ \ \ \ \ \}}
\DoxyCodeLine{00316\ }
\DoxyCodeLine{00317\ \ \ \ \ \textcolor{comment}{//\ Return\ a\ row\ from\ a\ matrix\ as\ a\ vector.}}
\DoxyCodeLine{00318\ \ \ \ \ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator[](\textcolor{keywordtype}{int}\ j)\ \{}
\DoxyCodeLine{00319\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{reinterpret\_cast<}\mbox{\hyperlink{structVec2D}{Vec2D}}\ *\textcolor{keyword}{>}(n[j]));}
\DoxyCodeLine{00320\ \ \ \ \ \}}
\DoxyCodeLine{00321\ }
\DoxyCodeLine{00322\ \ \ \ \ \textcolor{comment}{//\ Return\ a\ row\ from\ a\ matrix\ as\ a\ vector.}}
\DoxyCodeLine{00323\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{structVec2D}{Vec2D}}\ \&operator[](\textcolor{keywordtype}{int}\ j)\textcolor{keyword}{\ const\ }\{}
\DoxyCodeLine{00324\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (*\textcolor{keyword}{reinterpret\_cast<}\textcolor{keyword}{const\ }\mbox{\hyperlink{structVec2D}{Vec2D}}\ *\textcolor{keyword}{>}(n[j]));}
\DoxyCodeLine{00325\ \ \ \ \ \}}
\DoxyCodeLine{00326\ \};}
\DoxyCodeLine{00327\ }
\DoxyCodeLine{00328\ \textcolor{comment}{/*}}
\DoxyCodeLine{00329\ \textcolor{comment}{//\ Matrix\ Multiplication}}
\DoxyCodeLine{00330\ \textcolor{comment}{Matrix3D\ operator*(const\ Matrix3D\ \&A,\ const\ Matrix3D\ \&B)}}
\DoxyCodeLine{00331\ \textcolor{comment}{\{}}
\DoxyCodeLine{00332\ \textcolor{comment}{\ \ //\ TODO:}}
\DoxyCodeLine{00333\ \textcolor{comment}{\ \ Matrix3D\ result;}}
\DoxyCodeLine{00334\ \textcolor{comment}{}}
\DoxyCodeLine{00335\ \textcolor{comment}{\ \ float\ a\ =\ A(0,\ 0);}}
\DoxyCodeLine{00336\ \textcolor{comment}{\ \ float\ b\ =\ A(0,\ 1);}}
\DoxyCodeLine{00337\ \textcolor{comment}{\ \ float\ c\ =\ A(0,\ 2);}}
\DoxyCodeLine{00338\ \textcolor{comment}{\ \ float\ d\ =\ A(1,\ 0);}}
\DoxyCodeLine{00339\ \textcolor{comment}{\ \ float\ e\ =\ A(1,\ 1);}}
\DoxyCodeLine{00340\ \textcolor{comment}{\ \ float\ f\ =\ A(1,\ 2);}}
\DoxyCodeLine{00341\ \textcolor{comment}{\ \ float\ g\ =\ A(2,\ 0);}}
\DoxyCodeLine{00342\ \textcolor{comment}{\ \ float\ h\ =\ A(2,\ 1);}}
\DoxyCodeLine{00343\ \textcolor{comment}{\ \ float\ i\ =\ A(2,\ 2);}}
\DoxyCodeLine{00344\ \textcolor{comment}{}}
\DoxyCodeLine{00345\ \textcolor{comment}{\ \ float\ j\ =\ B(0,\ 0);}}
\DoxyCodeLine{00346\ \textcolor{comment}{\ \ float\ k\ =\ B(0,\ 1);}}
\DoxyCodeLine{00347\ \textcolor{comment}{\ \ float\ l\ =\ B(0,\ 2);}}
\DoxyCodeLine{00348\ \textcolor{comment}{\ \ float\ m\ =\ B(1,\ 0);}}
\DoxyCodeLine{00349\ \textcolor{comment}{\ \ float\ n\ =\ B(1,\ 1);}}
\DoxyCodeLine{00350\ \textcolor{comment}{\ \ float\ o\ =\ B(1,\ 2);}}
\DoxyCodeLine{00351\ \textcolor{comment}{\ \ float\ p\ =\ B(2,\ 0);}}
\DoxyCodeLine{00352\ \textcolor{comment}{\ \ float\ q\ =\ B(2,\ 1);}}
\DoxyCodeLine{00353\ \textcolor{comment}{\ \ float\ r\ =\ B(2,\ 2);}}
\DoxyCodeLine{00354\ \textcolor{comment}{}}
\DoxyCodeLine{00355\ \textcolor{comment}{\ \ result\ =\ Matrix3D(}}
\DoxyCodeLine{00356\ \textcolor{comment}{\ \ \ \ \ \ a\ *\ j\ +\ b\ *\ m\ +\ c\ *\ p,\ a\ *\ k\ +\ b\ *\ n\ +\ c\ *\ q,\ a\ *\ l\ +\ b\ *\ o\ +\ c\ *\ r,}}
\DoxyCodeLine{00357\ \textcolor{comment}{\ \ \ \ \ \ d\ *\ j\ +\ e\ *\ m\ +\ f\ *\ p,\ d\ *\ k\ +\ e\ *\ n\ +\ f\ *\ q,\ d\ *\ l\ +\ e\ *\ o\ +\ f\ *\ r,}}
\DoxyCodeLine{00358\ \textcolor{comment}{\ \ \ \ \ \ g\ *\ j\ +\ h\ *\ m\ +\ i\ *\ p,\ g\ *\ k\ +\ h\ *\ n\ +\ i\ *\ q,\ g\ *\ l\ +\ h\ *\ o\ +\ i\ *\ r);}}
\DoxyCodeLine{00359\ \textcolor{comment}{}}
\DoxyCodeLine{00360\ \textcolor{comment}{\ \ return\ result;}}
\DoxyCodeLine{00361\ \textcolor{comment}{\}}}
\DoxyCodeLine{00362\ \textcolor{comment}{}}
\DoxyCodeLine{00363\ \textcolor{comment}{//\ Matrix\ multiply\ by\ a\ vector}}
\DoxyCodeLine{00364\ \textcolor{comment}{Vec2D\ operator*(const\ Matrix3D\ \&M,\ const\ Vec2D\ \&v)}}
\DoxyCodeLine{00365\ \textcolor{comment}{\{}}
\DoxyCodeLine{00366\ \textcolor{comment}{\ \ //\ TODO:}}
\DoxyCodeLine{00367\ \textcolor{comment}{\ \ float\ a\ =\ M(0,\ 0);}}
\DoxyCodeLine{00368\ \textcolor{comment}{\ \ float\ b\ =\ M(0,\ 1);}}
\DoxyCodeLine{00369\ \textcolor{comment}{\ \ float\ c\ =\ M(0,\ 2);}}
\DoxyCodeLine{00370\ \textcolor{comment}{\ \ float\ d\ =\ M(1,\ 0);}}
\DoxyCodeLine{00371\ \textcolor{comment}{\ \ float\ e\ =\ M(1,\ 1);}}
\DoxyCodeLine{00372\ \textcolor{comment}{\ \ float\ f\ =\ M(1,\ 2);}}
\DoxyCodeLine{00373\ \textcolor{comment}{\ \ float\ g\ =\ M(2,\ 0);}}
\DoxyCodeLine{00374\ \textcolor{comment}{\ \ float\ h\ =\ M(2,\ 1);}}
\DoxyCodeLine{00375\ \textcolor{comment}{\ \ float\ i\ =\ M(2,\ 2);}}
\DoxyCodeLine{00376\ \textcolor{comment}{}}
\DoxyCodeLine{00377\ \textcolor{comment}{\ \ float\ j\ =\ v.x;}}
\DoxyCodeLine{00378\ \textcolor{comment}{\ \ float\ k\ =\ v.y;}}
\DoxyCodeLine{00379\ \textcolor{comment}{\ \ float\ l\ =\ v.w;}}
\DoxyCodeLine{00380\ \textcolor{comment}{}}
\DoxyCodeLine{00381\ \textcolor{comment}{\ \ Vec2D\ vec\ =\ Vec2D(}}
\DoxyCodeLine{00382\ \textcolor{comment}{\ \ \ \ \ \ a\ *\ j\ +\ b\ *\ k\ +\ c\ *\ l,}}
\DoxyCodeLine{00383\ \textcolor{comment}{\ \ \ \ \ \ d\ *\ j\ +\ e\ *\ k\ +\ f\ *\ l,}}
\DoxyCodeLine{00384\ \textcolor{comment}{\ \ \ \ \ \ g\ *\ j\ +\ h\ *\ k\ +\ i\ *\ l);}}
\DoxyCodeLine{00385\ \textcolor{comment}{}}
\DoxyCodeLine{00386\ \textcolor{comment}{\ \ return\ vec;}}
\DoxyCodeLine{00387\ \textcolor{comment}{\}}}
\DoxyCodeLine{00388\ \textcolor{comment}{}}
\DoxyCodeLine{00389\ \textcolor{comment}{//\ Pretty\ print\ a\ matrix}}
\DoxyCodeLine{00390\ \textcolor{comment}{void\ PrettyPrintMatrix(std::ostream\ \&os,\ const\ Matrix3D\ \&a)}}
\DoxyCodeLine{00391\ \textcolor{comment}{\{}}
\DoxyCodeLine{00392\ \textcolor{comment}{\ \ for\ (int\ i\ =\ 0;\ i\ <\ 3;\ ++i)}}
\DoxyCodeLine{00393\ \textcolor{comment}{\ \ \{}}
\DoxyCodeLine{00394\ \textcolor{comment}{\ \ \ \ for\ (int\ j\ =\ 0;\ j\ <\ 3;\ ++j)}}
\DoxyCodeLine{00395\ \textcolor{comment}{\ \ \ \ \{}}
\DoxyCodeLine{00396\ \textcolor{comment}{\ \ \ \ \ \ os\ <<\ i\ <<\ "{},\ "{}\ <<\ j\ <<\ "{}:\ "{}\ <<\ a(i,\ j)\ <<\ std::endl;}}
\DoxyCodeLine{00397\ \textcolor{comment}{\ \ \ \ \}}}
\DoxyCodeLine{00398\ \textcolor{comment}{\ \ \}}}
\DoxyCodeLine{00399\ \textcolor{comment}{\}}}
\DoxyCodeLine{00400\ \textcolor{comment}{*/}}
\DoxyCodeLine{00401\ \textcolor{preprocessor}{\#endif}}

\end{DoxyCode}
