<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.7" xml:lang="en-US">
  <compounddef id="d9/dec/TinyMath_8hpp" kind="file" language="C++">
    <compoundname>TinyMath.hpp</compoundname>
    <includes local="no">cmath</includes>
    <includes local="no">ostream</includes>
    <includedby refid="d0/d32/ControllerComponent_8hpp" local="yes">include/ControllerComponent.hpp</includedby>
    <includedby refid="d5/d69/IPhysicsComponent_8hpp" local="yes">include/IPhysicsComponent.hpp</includedby>
    <includedby refid="d8/da5/ProjectileComponent_8hpp" local="yes">include/ProjectileComponent.hpp</includedby>
    <includedby refid="d8/d16/RigidbodyComponent_8hpp" local="yes">include/RigidbodyComponent.hpp</includedby>
    <includedby refid="da/da5/Sprite_8hpp" local="yes">include/Sprite.hpp</includedby>
    <includedby refid="d9/da8/TransformComponent_8hpp" local="yes">include/TransformComponent.hpp</includedby>
    <includedby refid="d8/da4/GameMakerGUI_8cpp" local="yes">src/GameMakerGUI.cpp</includedby>
    <includedby refid="df/da7/PhysicsEngine_8cpp" local="yes">src/PhysicsEngine.cpp</includedby>
    <incdepgraph>
      <node id="1">
        <label>include/TinyMath.hpp</label>
        <link refid="d9/dec/TinyMath_8hpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
      </node>
      <node id="2">
        <label>cmath</label>
      </node>
      <node id="3">
        <label>ostream</label>
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="2">
        <label>include/ControllerComponent.hpp</label>
        <link refid="d0/d32/ControllerComponent_8hpp_source"/>
      </node>
      <node id="5">
        <label>include/Engine.hpp</label>
        <link refid="d3/d48/Engine_8hpp_source"/>
      </node>
      <node id="10">
        <label>include/GameMakerGUI.hpp</label>
        <link refid="df/d47/GameMakerGUI_8hpp_source"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="3">
        <label>include/IPhysicsComponent.hpp</label>
        <link refid="d5/d69/IPhysicsComponent_8hpp_source"/>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
      </node>
      <node id="4">
        <label>include/PhysicsEngine.hpp</label>
        <link refid="d1/d20/PhysicsEngine_8hpp_source"/>
        <childnode refid="5" relation="include">
        </childnode>
      </node>
      <node id="7">
        <label>include/ProjectileComponent.hpp</label>
        <link refid="d8/da5/ProjectileComponent_8hpp_source"/>
      </node>
      <node id="6">
        <label>include/RigidbodyComponent.hpp</label>
        <link refid="d8/d16/RigidbodyComponent_8hpp_source"/>
        <childnode refid="7" relation="include">
        </childnode>
      </node>
      <node id="8">
        <label>include/Sprite.hpp</label>
        <link refid="da/da5/Sprite_8hpp_source"/>
      </node>
      <node id="1">
        <label>include/TinyMath.hpp</label>
        <link refid="d9/dec/TinyMath_8hpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>include/TransformComponent.hpp</label>
        <link refid="d9/da8/TransformComponent_8hpp_source"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="10" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innerclass refid="dd/d40/structVec2D" prot="public">Vec2D</innerclass>
    <innerclass refid="d9/d86/structMatrix3D" prot="public">Matrix3D</innerclass>
      <sectiondef kind="func">
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a13c634cc0f6683fb64c1988ec6e016bf" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>float</type>
        <definition>float Dot</definition>
        <argsstring>(const Vec2D &amp;a, const Vec2D &amp;b)</argsstring>
        <name>Dot</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="110" column="14" bodyfile="include/TinyMath.hpp" bodystart="110" bodyend="113"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a389ec8ba680afdfd82e03e4a7364146c" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator*</definition>
        <argsstring>(const Vec2D &amp;v, float s)</argsstring>
        <name>operator*</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <param>
          <type>float</type>
          <declname>s</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="133" column="14" bodyfile="include/TinyMath.hpp" bodystart="133" bodyend="142"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a365f5b40244c8c7c59df6c9097805181" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator*</definition>
        <argsstring>(float s, const Vec2D &amp;v)</argsstring>
        <name>operator*</name>
        <param>
          <type>float</type>
          <declname>s</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="144" column="14" bodyfile="include/TinyMath.hpp" bodystart="144" bodyend="153"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1af7128a0e7c5651963e64ff0c11516234" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator/</definition>
        <argsstring>(const Vec2D &amp;v, float s)</argsstring>
        <name>operator/</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <param>
          <type>float</type>
          <declname>s</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="156" column="14" bodyfile="include/TinyMath.hpp" bodystart="156" bodyend="165"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a564d93ea759b7b5593bb796f3dae6929" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator-</definition>
        <argsstring>(const Vec2D &amp;v)</argsstring>
        <name>operator-</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="169" column="14" bodyfile="include/TinyMath.hpp" bodystart="169" bodyend="178"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a980dc8fbbbbd0d655b3b5d9f05b58683" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>float</type>
        <definition>float Magnitude</definition>
        <argsstring>(const Vec2D &amp;v)</argsstring>
        <name>Magnitude</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="181" column="14" bodyfile="include/TinyMath.hpp" bodystart="181" bodyend="184"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a96935e2ef8760209969fbc7ec539dc1a" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator+</definition>
        <argsstring>(const Vec2D &amp;a, const Vec2D &amp;b)</argsstring>
        <name>operator+</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="187" column="14" bodyfile="include/TinyMath.hpp" bodystart="187" bodyend="197"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a99a4da7d325bb5082675a9c240f5b495" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D operator-</definition>
        <argsstring>(const Vec2D &amp;a, const Vec2D &amp;b)</argsstring>
        <name>operator-</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="200" column="14" bodyfile="include/TinyMath.hpp" bodystart="200" bodyend="210"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1afaa32ce8c4e7d24cf0c99f018aaabd28" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D Project</definition>
        <argsstring>(const Vec2D &amp;a, const Vec2D &amp;b)</argsstring>
        <name>Project</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="213" column="14" bodyfile="include/TinyMath.hpp" bodystart="213" bodyend="218"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a5d42d0a9f493a566f084463c9fe090b5" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref></type>
        <definition>Vec2D Normalize</definition>
        <argsstring>(const Vec2D &amp;v)</argsstring>
        <name>Normalize</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>v</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="222" column="14" bodyfile="include/TinyMath.hpp" bodystart="222" bodyend="232"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1aaface09879e2254d3f9939a2c6e0751b" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>float</type>
        <definition>float CrossProduct</definition>
        <argsstring>(const Vec2D &amp;a, const Vec2D &amp;b)</argsstring>
        <name>CrossProduct</name>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>b</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="238" column="14" bodyfile="include/TinyMath.hpp" bodystart="238" bodyend="245"/>
      </memberdef>
      <memberdef kind="function" id="d9/dec/TinyMath_8hpp_1a8807d5a1b31b7fdb09cab02ee29d470c" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type>void</type>
        <definition>void PrettyPrint</definition>
        <argsstring>(std::ostream &amp;os, const Vec2D &amp;a)</argsstring>
        <name>PrettyPrint</name>
        <param>
          <type>std::ostream &amp;</type>
          <declname>os</declname>
        </param>
        <param>
          <type>const <ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref> &amp;</type>
          <declname>a</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="include/TinyMath.hpp" line="250" column="13" bodyfile="include/TinyMath.hpp" bodystart="250" bodyend="254"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#ifndef<sp/>TINYMATH_HPP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#define<sp/>TINYMATH_HPP</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;cmath&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;ostream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Forward<sp/>references<sp/>of<sp/>each<sp/>of<sp/>the<sp/>structs</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>;</highlight></codeline>
<codeline lineno="9"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="d9/d86/structMatrix3D" kindref="compound">Matrix3D</ref>;</highlight></codeline>
<codeline lineno="10"><highlight class="normal"></highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Vec2D<sp/>performs<sp/>vector<sp/>operations<sp/>with<sp/>3-dimensions</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight><highlight class="comment">//<sp/>The<sp/>purpose<sp/>of<sp/>this<sp/>class<sp/>is<sp/>primarily<sp/>for<sp/>3D<sp/>graphics</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="comment">//<sp/>applications.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14" refid="dd/d40/structVec2D" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>{</highlight></codeline>
<codeline lineno="15"><highlight class="normal"></highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>I&apos;m<sp/>wrapping<sp/>all<sp/>of<sp/>our<sp/>member<sp/>variables<sp/>in<sp/>a<sp/>union.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>So<sp/>long<sp/>as<sp/>you<sp/>make<sp/>sure<sp/>the<sp/>byte-size<sp/>is<sp/>equivalent,<sp/>this</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>allows<sp/>you<sp/>to<sp/>access<sp/>the<sp/>data<sp/>in<sp/>whatever<sp/>form<sp/>is<sp/>most<sp/>convenient.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Meaning<sp/>I<sp/>can<sp/>access<sp/>Vec2D[0]<sp/>or<sp/>equivalently<sp/>Vec2D.x<sp/>.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>I<sp/>can<sp/>also<sp/>pass<sp/>Vec2D<sp/>internal<sp/>array<sp/>or<sp/>just<sp/>individual<sp/>values<sp/>if<sp/>needed<sp/>conveniently.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">union<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Note:<sp/>x,y<sp/>are<sp/>a<sp/>convention</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>x,y<sp/>could<sp/>be<sp/>position,<sp/>but<sp/>also<sp/>any<sp/>2-component<sp/>value.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>x;</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>y;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>w;<sp/></highlight><highlight class="comment">//<sp/>&apos;w&apos;<sp/>is<sp/>a<sp/>third<sp/>hidden<sp/>component<sp/>that<sp/>could<sp/>be<sp/>used</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>to<sp/>determine<sp/>if<sp/>this<sp/>is<sp/>being<sp/>used<sp/>as<sp/>a<sp/>vector<sp/>or<sp/>a<sp/>point</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>If<sp/>w=0<sp/>then<sp/>a<sp/>vector,<sp/>if<sp/>w=1<sp/>then<sp/>a<sp/>point</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="30"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>DO<sp/>not<sp/>use<sp/>&apos;w&apos;<sp/>for<sp/>any<sp/>computation<sp/>however.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>data[3];<sp/></highlight><highlight class="comment">//<sp/>for<sp/>convenience<sp/>if<sp/>you<sp/>want<sp/>to<sp/>access<sp/>as<sp/>&apos;data&apos;<sp/>or<sp/>pass<sp/>Vec2D<sp/>as<sp/>an<sp/>array</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/>};</highlight></codeline>
<codeline lineno="34"><highlight class="normal"></highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Default<sp/>conostrutcor</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="36"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>&apos;why<sp/>default?&apos;<sp/>https://stackoverflow.com/questions/20828907/the-new-keyword-default-in-c11</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/>Vec2D()<sp/>=<sp/>default;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"></highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>&quot;Real&quot;<sp/>constructor<sp/>we<sp/>want<sp/>to<sp/>use.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>This<sp/>initializes<sp/>the<sp/>values<sp/>x,y,<sp/>and<sp/>the<sp/>&apos;w&apos;<sp/>value</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>_x<sp/>=<sp/>0,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>_y<sp/>=<sp/>0,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>_w<sp/>=<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x<sp/>=<sp/>_x;</highlight></codeline>
<codeline lineno="44"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y<sp/>=<sp/>_y;</highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>w<sp/>=<sp/>_w;</highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="47"><highlight class="normal"></highlight></codeline>
<codeline lineno="48"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Index<sp/>operator,<sp/>allowing<sp/>us<sp/>to<sp/>access<sp/>the<sp/>individual</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="49"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>x,y<sp/>components<sp/>of<sp/>our<sp/>vector.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;operator[](</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)<sp/>{</highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>Think<sp/>about<sp/>why<sp/>this<sp/>works.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>There<sp/>is<sp/>no<sp/>code<sp/>to<sp/>change<sp/>here.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((&amp;x)[i]);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="55"><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Index<sp/>operator,<sp/>allowing<sp/>us<sp/>to<sp/>access<sp/>the<sp/>individual</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>x,y<sp/>components<sp/>of<sp/>our<sp/>vector.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="58"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;operator[](</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>NOTE:<sp/>Think<sp/>about<sp/>why<sp/>this<sp/>works.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>There<sp/>is<sp/>no<sp/>code<sp/>to<sp/>change<sp/>here.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="61"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>((&amp;x)[i]);</highlight></codeline>
<codeline lineno="62"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="63"><highlight class="normal"></highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>General<sp/>Note</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="65"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>You&apos;ll<sp/>observer<sp/>that<sp/>some<sp/>of<sp/>the<sp/>operator<sp/>overloads<sp/>appear<sp/>in<sp/>this<sp/>class</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="66"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>as<sp/>member<sp/>functions<sp/>versus<sp/>some<sp/>that<sp/>are<sp/>free<sp/>functions.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="67"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>In<sp/>general,<sp/>if<sp/>you<sp/>need<sp/>access<sp/>to<sp/>private<sp/>member<sp/>variables<sp/>or<sp/>the<sp/>&apos;this&apos;<sp/>pointer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>then<sp/>you<sp/>must<sp/>use<sp/>a<sp/>member<sp/>function.<sp/>Otherwise,<sp/>I<sp/>recommend<sp/>to<sp/>&apos;free<sp/>your<sp/>functions&apos;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="69"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>and<sp/>not<sp/>make<sp/>them<sp/>part<sp/>of<sp/>the<sp/>class<sp/>for<sp/>maximum<sp/>use.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="70"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="71"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Multiplication<sp/>Operator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Multiply<sp/>vector<sp/>by<sp/>a<sp/>uniform-scalar.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="73"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator*=(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
<codeline lineno="74"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x<sp/>*=<sp/>s;</highlight></codeline>
<codeline lineno="76"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y<sp/>*=<sp/>s;</highlight></codeline>
<codeline lineno="77"><highlight class="normal"></highlight></codeline>
<codeline lineno="78"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="79"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight></codeline>
<codeline lineno="81"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Division<sp/>Operator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator/=(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
<codeline lineno="83"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x<sp/>/=<sp/>s;</highlight></codeline>
<codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y<sp/>/=<sp/>s;</highlight></codeline>
<codeline lineno="86"><highlight class="normal"></highlight></codeline>
<codeline lineno="87"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="88"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="89"><highlight class="normal"></highlight></codeline>
<codeline lineno="90"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Addition<sp/>operator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="91"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator+=(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="92"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="93"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x<sp/>+=<sp/>v.x;</highlight></codeline>
<codeline lineno="94"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y<sp/>+=<sp/>v.y;</highlight></codeline>
<codeline lineno="95"><highlight class="normal"></highlight></codeline>
<codeline lineno="96"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="98"><highlight class="normal"></highlight></codeline>
<codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Subtraction<sp/>operator</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="100"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator-=(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="101"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="102"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>x<sp/>-=<sp/>v.x;</highlight></codeline>
<codeline lineno="103"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>y<sp/>-=<sp/>v.y;</highlight></codeline>
<codeline lineno="104"><highlight class="normal"></highlight></codeline>
<codeline lineno="105"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">this</highlight><highlight class="normal">);</highlight></codeline>
<codeline lineno="106"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="107"><highlight class="normal">};</highlight></codeline>
<codeline lineno="108"><highlight class="normal"></highlight></codeline>
<codeline lineno="109"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Compute<sp/>the<sp/>dot<sp/>product<sp/>of<sp/>a<sp/>Vec2D</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="110"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>Dot(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b)<sp/>{</highlight></codeline>
<codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="112"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>a.x<sp/>*<sp/>b.x<sp/>+<sp/>a.y<sp/>*<sp/>b.y<sp/>+<sp/>a.w<sp/>*<sp/>b.w;</highlight></codeline>
<codeline lineno="113"><highlight class="normal">}</highlight></codeline>
<codeline lineno="114"><highlight class="normal"></highlight></codeline>
<codeline lineno="115"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="116"><highlight class="comment">//<sp/>Test<sp/>for<sp/>equality</highlight></codeline>
<codeline lineno="117"><highlight class="comment">//<sp/>NOTE:<sp/>Comparing<sp/>floats<sp/>is<sp/>somewhat<sp/>tricky,<sp/>meaning<sp/>that</highlight></codeline>
<codeline lineno="118"><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>you<sp/>will<sp/>want<sp/>to<sp/>take<sp/>the<sp/>fabs(lhs.x<sp/>-<sp/>lhs.y)<sp/>&lt;<sp/>0.00001</highlight></codeline>
<codeline lineno="119"><highlight class="comment">//<sp/><sp/><sp/><sp/><sp/><sp/><sp/>of<sp/>each<sp/>component<sp/>to<sp/>see<sp/>if<sp/>they<sp/>are<sp/>&apos;close<sp/>enough&apos;</highlight></codeline>
<codeline lineno="120"><highlight class="comment">bool<sp/>operator==(Vec2D<sp/>&amp;lhs,<sp/>Vec2D<sp/>&amp;rhs)</highlight></codeline>
<codeline lineno="121"><highlight class="comment">{</highlight></codeline>
<codeline lineno="122"><highlight class="comment"><sp/><sp/>bool<sp/>result<sp/>=<sp/>true;</highlight></codeline>
<codeline lineno="123"><highlight class="comment"><sp/><sp/>//<sp/>TODO</highlight></codeline>
<codeline lineno="124"><highlight class="comment"><sp/><sp/>if<sp/>(fabs(lhs.x<sp/>-<sp/>rhs.x)<sp/>&gt;<sp/>0.00001<sp/>||<sp/>fabs(lhs.y<sp/>-<sp/>rhs.y)<sp/>&gt;<sp/>0.00001<sp/>||<sp/>fabs(lhs.w<sp/>-<sp/>rhs.w)<sp/>&gt;<sp/>0.00001)</highlight></codeline>
<codeline lineno="125"><highlight class="comment"><sp/><sp/>{</highlight></codeline>
<codeline lineno="126"><highlight class="comment"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>false;</highlight></codeline>
<codeline lineno="127"><highlight class="comment"><sp/><sp/>}</highlight></codeline>
<codeline lineno="128"><highlight class="comment"><sp/><sp/>return<sp/>result;</highlight></codeline>
<codeline lineno="129"><highlight class="comment">}</highlight></codeline>
<codeline lineno="130"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="131"><highlight class="normal"></highlight></codeline>
<codeline lineno="132"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Multiplication<sp/>of<sp/>a<sp/>vector<sp/>by<sp/>a<sp/>scalar<sp/>values</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="133"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator*(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
<codeline lineno="134"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="136"><highlight class="normal"></highlight></codeline>
<codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>v.x<sp/>*<sp/>s;</highlight></codeline>
<codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>v.y<sp/>*<sp/>s;</highlight></codeline>
<codeline lineno="139"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="140"><highlight class="normal"></highlight></codeline>
<codeline lineno="141"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="142"><highlight class="normal">}</highlight></codeline>
<codeline lineno="143"><highlight class="normal"></highlight></codeline>
<codeline lineno="144"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator*(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>s,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="146"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="147"><highlight class="normal"></highlight></codeline>
<codeline lineno="148"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>v.x<sp/>*<sp/>s;</highlight></codeline>
<codeline lineno="149"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>v.y<sp/>*<sp/>s;</highlight></codeline>
<codeline lineno="150"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="151"><highlight class="normal"></highlight></codeline>
<codeline lineno="152"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="153"><highlight class="normal">}</highlight></codeline>
<codeline lineno="154"><highlight class="normal"></highlight></codeline>
<codeline lineno="155"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Division<sp/>of<sp/>a<sp/>vector<sp/>by<sp/>a<sp/>scalar<sp/>value.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="156"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator/(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>s)<sp/>{</highlight></codeline>
<codeline lineno="157"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="158"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="159"><highlight class="normal"></highlight></codeline>
<codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>v.x<sp/>/<sp/>s;</highlight></codeline>
<codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>v.y<sp/>/<sp/>s;</highlight></codeline>
<codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="163"><highlight class="normal"></highlight></codeline>
<codeline lineno="164"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="165"><highlight class="normal">}</highlight></codeline>
<codeline lineno="166"><highlight class="normal"></highlight></codeline>
<codeline lineno="167"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Negation<sp/>of<sp/>a<sp/>vector</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="168"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Use<sp/>Case:<sp/>Sometimes<sp/>it<sp/>is<sp/>handy<sp/>to<sp/>apply<sp/>a<sp/>force<sp/>in<sp/>an<sp/>opposite<sp/>direction</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="169"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator-(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="171"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="172"><highlight class="normal"></highlight></codeline>
<codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>v.x<sp/>*<sp/>-1.0f;</highlight></codeline>
<codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>v.y<sp/>*<sp/>-1.0f;</highlight></codeline>
<codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="176"><highlight class="normal"></highlight></codeline>
<codeline lineno="177"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="178"><highlight class="normal">}</highlight></codeline>
<codeline lineno="179"><highlight class="normal"></highlight></codeline>
<codeline lineno="180"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Return<sp/>the<sp/>magnitude<sp/>of<sp/>a<sp/>vector</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="181"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>Magnitude(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="182"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="183"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>sqrt(v.x<sp/>*<sp/>v.x<sp/>+<sp/>v.y<sp/>*<sp/>v.y);</highlight></codeline>
<codeline lineno="184"><highlight class="normal">}</highlight></codeline>
<codeline lineno="185"><highlight class="normal"></highlight></codeline>
<codeline lineno="186"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Add<sp/>two<sp/>vectors<sp/>together</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="187"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator+(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b)<sp/>{</highlight></codeline>
<codeline lineno="188"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="189"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="190"><highlight class="normal"></highlight></codeline>
<codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>a.x<sp/>+<sp/>b.x;</highlight></codeline>
<codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>a.y<sp/>+<sp/>b.y;</highlight></codeline>
<codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="194"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>a.w;</highlight></codeline>
<codeline lineno="195"><highlight class="normal"></highlight></codeline>
<codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="197"><highlight class="normal">}</highlight></codeline>
<codeline lineno="198"><highlight class="normal"></highlight></codeline>
<codeline lineno="199"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Subtract<sp/>two<sp/>vectors</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="200"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>operator-(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b)<sp/>{</highlight></codeline>
<codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="203"><highlight class="normal"></highlight></codeline>
<codeline lineno="204"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>a.x<sp/>-<sp/>b.x;</highlight></codeline>
<codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>a.y<sp/>-<sp/>b.y;</highlight></codeline>
<codeline lineno="206"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//?</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>a.w;</highlight></codeline>
<codeline lineno="208"><highlight class="normal"></highlight></codeline>
<codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="210"><highlight class="normal">}</highlight></codeline>
<codeline lineno="211"><highlight class="normal"></highlight></codeline>
<codeline lineno="212"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Vector<sp/>Projection</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="213"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>Project(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b)<sp/>{</highlight></codeline>
<codeline lineno="214"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="215"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="216"><highlight class="normal"></highlight></codeline>
<codeline lineno="217"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>b<sp/>*<sp/>(float)<sp/>(Dot(a,<sp/>b)<sp/>/<sp/>(float)<sp/>pow(Magnitude(b),<sp/>2));</highlight></codeline>
<codeline lineno="218"><highlight class="normal">}</highlight></codeline>
<codeline lineno="219"><highlight class="normal"></highlight></codeline>
<codeline lineno="220"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Set<sp/>a<sp/>vectors<sp/>magnitude<sp/>to<sp/>1</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="221"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Note:<sp/>This<sp/>is<sp/>NOT<sp/>generating<sp/>a<sp/>normal<sp/>vector</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="222"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>Normalize(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;v)<sp/>{</highlight></codeline>
<codeline lineno="223"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="224"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>vec;</highlight></codeline>
<codeline lineno="225"><highlight class="normal"></highlight></codeline>
<codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>mag<sp/>=<sp/>Magnitude(v);</highlight></codeline>
<codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.x<sp/>=<sp/>v.x<sp/>/<sp/>mag;</highlight></codeline>
<codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.y<sp/>=<sp/>v.y<sp/>/<sp/>mag;</highlight></codeline>
<codeline lineno="229"><highlight class="normal"><sp/><sp/><sp/><sp/>vec.w<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="230"><highlight class="normal"></highlight></codeline>
<codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>vec;</highlight></codeline>
<codeline lineno="232"><highlight class="normal">}</highlight></codeline>
<codeline lineno="233"><highlight class="normal"></highlight></codeline>
<codeline lineno="234"><highlight class="normal"></highlight><highlight class="comment">//<sp/>a<sp/>x<sp/>b<sp/>(read:<sp/>&apos;a<sp/>crossed<sp/>b&apos;)</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="235"><highlight class="normal"></highlight><highlight class="comment">//<sp/>With<sp/>a<sp/>3D<sp/>vector<sp/>we<sp/>would<sp/>yield<sp/>another<sp/>perpendicular<sp/>cross<sp/>product</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="236"><highlight class="normal"></highlight><highlight class="comment">//<sp/>For<sp/>2D<sp/>cross<sp/>product,<sp/>this<sp/>will<sp/>yield<sp/>a<sp/>scalar.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="237"><highlight class="normal"></highlight><highlight class="comment">//<sp/>You<sp/>should<sp/>write<sp/>this<sp/>to<sp/>yield<sp/>a<sp/>scalar<sp/>value.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="238"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>CrossProduct(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b)<sp/>{</highlight></codeline>
<codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="241"><highlight class="normal"></highlight></codeline>
<codeline lineno="242"><highlight class="normal"><sp/><sp/><sp/><sp/>result<sp/>=<sp/>a.x<sp/>*<sp/>b.y<sp/>-<sp/>b.x<sp/>*<sp/>a.y;</highlight></codeline>
<codeline lineno="243"><highlight class="normal"></highlight></codeline>
<codeline lineno="244"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>result;</highlight></codeline>
<codeline lineno="245"><highlight class="normal">}</highlight></codeline>
<codeline lineno="246"><highlight class="normal"></highlight></codeline>
<codeline lineno="247"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Pretty<sp/>print<sp/>a<sp/>vector</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="248"><highlight class="normal"></highlight><highlight class="comment">//<sp/>std::ostream&amp;<sp/>could<sp/>be<sp/>&apos;std::cout&apos;<sp/>for<sp/>example&apos;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="249"><highlight class="normal"></highlight><highlight class="comment">//<sp/>This<sp/>function<sp/>is<sp/>primarily<sp/>used<sp/>for<sp/>debugging<sp/>purposes</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="250"><highlight class="normal"></highlight><highlight class="keyword">inline</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>PrettyPrint(std::ostream<sp/>&amp;os,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a)<sp/>{</highlight></codeline>
<codeline lineno="251"><highlight class="normal"><sp/><sp/><sp/><sp/>os<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;x<sp/><sp/>:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>a.x<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="252"><highlight class="normal"><sp/><sp/><sp/><sp/>os<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;y<sp/><sp/>:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>a.y<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="253"><highlight class="normal"><sp/><sp/><sp/><sp/>os<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;(w):<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>a.w<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="254"><highlight class="normal">}</highlight></codeline>
<codeline lineno="255"><highlight class="normal"></highlight></codeline>
<codeline lineno="256"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Matrix<sp/>3D<sp/>represents<sp/>3x3<sp/>matrices<sp/>in<sp/>Math</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="257" refid="d9/d86/structMatrix3D" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">struct<sp/></highlight><highlight class="normal"><ref refid="d9/d86/structMatrix3D" kindref="compound">Matrix3D</ref><sp/>{</highlight></codeline>
<codeline lineno="258"><highlight class="normal"></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n[3][3];<sp/></highlight><highlight class="comment">//<sp/>Store<sp/>each<sp/>value<sp/>of<sp/>the<sp/>matrix</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="260"><highlight class="normal"></highlight></codeline>
<codeline lineno="261"><highlight class="normal"></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initializes<sp/>to<sp/>a<sp/>identity<sp/>matrix<sp/>by<sp/>default</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d86/structMatrix3D" kindref="compound">Matrix3D</ref>()<sp/>{</highlight></codeline>
<codeline lineno="264"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][0]<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][1]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][2]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][1]<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="269"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][2]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][0]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="271"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][1]<sp/>=<sp/>0;</highlight></codeline>
<codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][2]<sp/>=<sp/>1;</highlight></codeline>
<codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="274"><highlight class="normal"></highlight></codeline>
<codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>TODO:<sp/>Row<sp/>or<sp/>column<sp/>major<sp/>order<sp/>you<sp/>decide!</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="276"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Matrix<sp/>constructor<sp/>with<sp/>9<sp/>scalar<sp/>values.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="277"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d86/structMatrix3D" kindref="compound">Matrix3D</ref>(</highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n00,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n01,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n02,</highlight></codeline>
<codeline lineno="278"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n10,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n11,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n12,</highlight></codeline>
<codeline lineno="279"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n20,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n21,<sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>n22)<sp/>{</highlight></codeline>
<codeline lineno="280"><highlight class="normal"></highlight></codeline>
<codeline lineno="281"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][0]<sp/>=<sp/>n00;</highlight></codeline>
<codeline lineno="282"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][1]<sp/>=<sp/>n01;</highlight></codeline>
<codeline lineno="283"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][2]<sp/>=<sp/>n02;</highlight></codeline>
<codeline lineno="284"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][0]<sp/>=<sp/>n10;</highlight></codeline>
<codeline lineno="285"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][1]<sp/>=<sp/>n11;</highlight></codeline>
<codeline lineno="286"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][2]<sp/>=<sp/>n12;</highlight></codeline>
<codeline lineno="287"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][0]<sp/>=<sp/>n20;</highlight></codeline>
<codeline lineno="288"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][1]<sp/>=<sp/>n21;</highlight></codeline>
<codeline lineno="289"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][2]<sp/>=<sp/>n22;</highlight></codeline>
<codeline lineno="290"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="291"><highlight class="normal"></highlight></codeline>
<codeline lineno="292"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Matrix<sp/>constructor<sp/>from<sp/>three<sp/>vectors.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="293"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="d9/d86/structMatrix3D" kindref="compound">Matrix3D</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;a,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;b,<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;c)<sp/>{</highlight></codeline>
<codeline lineno="294"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][0]<sp/>=<sp/>a.x;</highlight></codeline>
<codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][1]<sp/>=<sp/>a.y;</highlight></codeline>
<codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[0][2]<sp/>=<sp/>a.w;</highlight></codeline>
<codeline lineno="297"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][0]<sp/>=<sp/>b.x;</highlight></codeline>
<codeline lineno="298"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][1]<sp/>=<sp/>b.y;</highlight></codeline>
<codeline lineno="299"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[1][2]<sp/>=<sp/>b.w;</highlight></codeline>
<codeline lineno="300"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][0]<sp/>=<sp/>c.x;</highlight></codeline>
<codeline lineno="301"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][1]<sp/>=<sp/>c.y;</highlight></codeline>
<codeline lineno="302"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>n[2][2]<sp/>=<sp/>c.w;</highlight></codeline>
<codeline lineno="303"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="304"><highlight class="normal"></highlight></codeline>
<codeline lineno="305"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Index<sp/>operator<sp/>with<sp/>two<sp/>dimensions</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="306"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Example:<sp/>M(1,1)<sp/>returns<sp/>row<sp/>1<sp/>and<sp/>column<sp/>1<sp/>of<sp/>matrix<sp/>M.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="307"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;operator()(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j)<sp/>{</highlight></codeline>
<codeline lineno="308"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(n[i][j]);</highlight></codeline>
<codeline lineno="309"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="310"><highlight class="normal"></highlight></codeline>
<codeline lineno="311"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Index<sp/>operator<sp/>with<sp/>two<sp/>dimensions</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="312"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Example:<sp/>M(1,1)<sp/>returns<sp/>row<sp/>1<sp/>and<sp/>column<sp/>1<sp/>of<sp/>matrix<sp/>M.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="313"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">float</highlight><highlight class="normal"><sp/>&amp;operator()(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="314"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(n[i][j]);</highlight></codeline>
<codeline lineno="315"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="316"><highlight class="normal"></highlight></codeline>
<codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Return<sp/>a<sp/>row<sp/>from<sp/>a<sp/>matrix<sp/>as<sp/>a<sp/>vector.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator[](</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j)<sp/>{</highlight></codeline>
<codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">reinterpret_cast&lt;</highlight><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(n[j]));</highlight></codeline>
<codeline lineno="320"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="321"><highlight class="normal"></highlight></codeline>
<codeline lineno="322"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Return<sp/>a<sp/>row<sp/>from<sp/>a<sp/>matrix<sp/>as<sp/>a<sp/>vector.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="323"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>&amp;operator[](</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>j)</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight></codeline>
<codeline lineno="324"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>(*</highlight><highlight class="keyword">reinterpret_cast&lt;</highlight><highlight class="keyword">const<sp/></highlight><highlight class="normal"><ref refid="dd/d40/structVec2D" kindref="compound">Vec2D</ref><sp/>*</highlight><highlight class="keyword">&gt;</highlight><highlight class="normal">(n[j]));</highlight></codeline>
<codeline lineno="325"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="326"><highlight class="normal">};</highlight></codeline>
<codeline lineno="327"><highlight class="normal"></highlight></codeline>
<codeline lineno="328"><highlight class="normal"></highlight><highlight class="comment">/*</highlight></codeline>
<codeline lineno="329"><highlight class="comment">//<sp/>Matrix<sp/>Multiplication</highlight></codeline>
<codeline lineno="330"><highlight class="comment">Matrix3D<sp/>operator*(const<sp/>Matrix3D<sp/>&amp;A,<sp/>const<sp/>Matrix3D<sp/>&amp;B)</highlight></codeline>
<codeline lineno="331"><highlight class="comment">{</highlight></codeline>
<codeline lineno="332"><highlight class="comment"><sp/><sp/>//<sp/>TODO:</highlight></codeline>
<codeline lineno="333"><highlight class="comment"><sp/><sp/>Matrix3D<sp/>result;</highlight></codeline>
<codeline lineno="334"><highlight class="comment"></highlight></codeline>
<codeline lineno="335"><highlight class="comment"><sp/><sp/>float<sp/>a<sp/>=<sp/>A(0,<sp/>0);</highlight></codeline>
<codeline lineno="336"><highlight class="comment"><sp/><sp/>float<sp/>b<sp/>=<sp/>A(0,<sp/>1);</highlight></codeline>
<codeline lineno="337"><highlight class="comment"><sp/><sp/>float<sp/>c<sp/>=<sp/>A(0,<sp/>2);</highlight></codeline>
<codeline lineno="338"><highlight class="comment"><sp/><sp/>float<sp/>d<sp/>=<sp/>A(1,<sp/>0);</highlight></codeline>
<codeline lineno="339"><highlight class="comment"><sp/><sp/>float<sp/>e<sp/>=<sp/>A(1,<sp/>1);</highlight></codeline>
<codeline lineno="340"><highlight class="comment"><sp/><sp/>float<sp/>f<sp/>=<sp/>A(1,<sp/>2);</highlight></codeline>
<codeline lineno="341"><highlight class="comment"><sp/><sp/>float<sp/>g<sp/>=<sp/>A(2,<sp/>0);</highlight></codeline>
<codeline lineno="342"><highlight class="comment"><sp/><sp/>float<sp/>h<sp/>=<sp/>A(2,<sp/>1);</highlight></codeline>
<codeline lineno="343"><highlight class="comment"><sp/><sp/>float<sp/>i<sp/>=<sp/>A(2,<sp/>2);</highlight></codeline>
<codeline lineno="344"><highlight class="comment"></highlight></codeline>
<codeline lineno="345"><highlight class="comment"><sp/><sp/>float<sp/>j<sp/>=<sp/>B(0,<sp/>0);</highlight></codeline>
<codeline lineno="346"><highlight class="comment"><sp/><sp/>float<sp/>k<sp/>=<sp/>B(0,<sp/>1);</highlight></codeline>
<codeline lineno="347"><highlight class="comment"><sp/><sp/>float<sp/>l<sp/>=<sp/>B(0,<sp/>2);</highlight></codeline>
<codeline lineno="348"><highlight class="comment"><sp/><sp/>float<sp/>m<sp/>=<sp/>B(1,<sp/>0);</highlight></codeline>
<codeline lineno="349"><highlight class="comment"><sp/><sp/>float<sp/>n<sp/>=<sp/>B(1,<sp/>1);</highlight></codeline>
<codeline lineno="350"><highlight class="comment"><sp/><sp/>float<sp/>o<sp/>=<sp/>B(1,<sp/>2);</highlight></codeline>
<codeline lineno="351"><highlight class="comment"><sp/><sp/>float<sp/>p<sp/>=<sp/>B(2,<sp/>0);</highlight></codeline>
<codeline lineno="352"><highlight class="comment"><sp/><sp/>float<sp/>q<sp/>=<sp/>B(2,<sp/>1);</highlight></codeline>
<codeline lineno="353"><highlight class="comment"><sp/><sp/>float<sp/>r<sp/>=<sp/>B(2,<sp/>2);</highlight></codeline>
<codeline lineno="354"><highlight class="comment"></highlight></codeline>
<codeline lineno="355"><highlight class="comment"><sp/><sp/>result<sp/>=<sp/>Matrix3D(</highlight></codeline>
<codeline lineno="356"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>a<sp/>*<sp/>j<sp/>+<sp/>b<sp/>*<sp/>m<sp/>+<sp/>c<sp/>*<sp/>p,<sp/>a<sp/>*<sp/>k<sp/>+<sp/>b<sp/>*<sp/>n<sp/>+<sp/>c<sp/>*<sp/>q,<sp/>a<sp/>*<sp/>l<sp/>+<sp/>b<sp/>*<sp/>o<sp/>+<sp/>c<sp/>*<sp/>r,</highlight></codeline>
<codeline lineno="357"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>d<sp/>*<sp/>j<sp/>+<sp/>e<sp/>*<sp/>m<sp/>+<sp/>f<sp/>*<sp/>p,<sp/>d<sp/>*<sp/>k<sp/>+<sp/>e<sp/>*<sp/>n<sp/>+<sp/>f<sp/>*<sp/>q,<sp/>d<sp/>*<sp/>l<sp/>+<sp/>e<sp/>*<sp/>o<sp/>+<sp/>f<sp/>*<sp/>r,</highlight></codeline>
<codeline lineno="358"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>g<sp/>*<sp/>j<sp/>+<sp/>h<sp/>*<sp/>m<sp/>+<sp/>i<sp/>*<sp/>p,<sp/>g<sp/>*<sp/>k<sp/>+<sp/>h<sp/>*<sp/>n<sp/>+<sp/>i<sp/>*<sp/>q,<sp/>g<sp/>*<sp/>l<sp/>+<sp/>h<sp/>*<sp/>o<sp/>+<sp/>i<sp/>*<sp/>r);</highlight></codeline>
<codeline lineno="359"><highlight class="comment"></highlight></codeline>
<codeline lineno="360"><highlight class="comment"><sp/><sp/>return<sp/>result;</highlight></codeline>
<codeline lineno="361"><highlight class="comment">}</highlight></codeline>
<codeline lineno="362"><highlight class="comment"></highlight></codeline>
<codeline lineno="363"><highlight class="comment">//<sp/>Matrix<sp/>multiply<sp/>by<sp/>a<sp/>vector</highlight></codeline>
<codeline lineno="364"><highlight class="comment">Vec2D<sp/>operator*(const<sp/>Matrix3D<sp/>&amp;M,<sp/>const<sp/>Vec2D<sp/>&amp;v)</highlight></codeline>
<codeline lineno="365"><highlight class="comment">{</highlight></codeline>
<codeline lineno="366"><highlight class="comment"><sp/><sp/>//<sp/>TODO:</highlight></codeline>
<codeline lineno="367"><highlight class="comment"><sp/><sp/>float<sp/>a<sp/>=<sp/>M(0,<sp/>0);</highlight></codeline>
<codeline lineno="368"><highlight class="comment"><sp/><sp/>float<sp/>b<sp/>=<sp/>M(0,<sp/>1);</highlight></codeline>
<codeline lineno="369"><highlight class="comment"><sp/><sp/>float<sp/>c<sp/>=<sp/>M(0,<sp/>2);</highlight></codeline>
<codeline lineno="370"><highlight class="comment"><sp/><sp/>float<sp/>d<sp/>=<sp/>M(1,<sp/>0);</highlight></codeline>
<codeline lineno="371"><highlight class="comment"><sp/><sp/>float<sp/>e<sp/>=<sp/>M(1,<sp/>1);</highlight></codeline>
<codeline lineno="372"><highlight class="comment"><sp/><sp/>float<sp/>f<sp/>=<sp/>M(1,<sp/>2);</highlight></codeline>
<codeline lineno="373"><highlight class="comment"><sp/><sp/>float<sp/>g<sp/>=<sp/>M(2,<sp/>0);</highlight></codeline>
<codeline lineno="374"><highlight class="comment"><sp/><sp/>float<sp/>h<sp/>=<sp/>M(2,<sp/>1);</highlight></codeline>
<codeline lineno="375"><highlight class="comment"><sp/><sp/>float<sp/>i<sp/>=<sp/>M(2,<sp/>2);</highlight></codeline>
<codeline lineno="376"><highlight class="comment"></highlight></codeline>
<codeline lineno="377"><highlight class="comment"><sp/><sp/>float<sp/>j<sp/>=<sp/>v.x;</highlight></codeline>
<codeline lineno="378"><highlight class="comment"><sp/><sp/>float<sp/>k<sp/>=<sp/>v.y;</highlight></codeline>
<codeline lineno="379"><highlight class="comment"><sp/><sp/>float<sp/>l<sp/>=<sp/>v.w;</highlight></codeline>
<codeline lineno="380"><highlight class="comment"></highlight></codeline>
<codeline lineno="381"><highlight class="comment"><sp/><sp/>Vec2D<sp/>vec<sp/>=<sp/>Vec2D(</highlight></codeline>
<codeline lineno="382"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>a<sp/>*<sp/>j<sp/>+<sp/>b<sp/>*<sp/>k<sp/>+<sp/>c<sp/>*<sp/>l,</highlight></codeline>
<codeline lineno="383"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>d<sp/>*<sp/>j<sp/>+<sp/>e<sp/>*<sp/>k<sp/>+<sp/>f<sp/>*<sp/>l,</highlight></codeline>
<codeline lineno="384"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>g<sp/>*<sp/>j<sp/>+<sp/>h<sp/>*<sp/>k<sp/>+<sp/>i<sp/>*<sp/>l);</highlight></codeline>
<codeline lineno="385"><highlight class="comment"></highlight></codeline>
<codeline lineno="386"><highlight class="comment"><sp/><sp/>return<sp/>vec;</highlight></codeline>
<codeline lineno="387"><highlight class="comment">}</highlight></codeline>
<codeline lineno="388"><highlight class="comment"></highlight></codeline>
<codeline lineno="389"><highlight class="comment">//<sp/>Pretty<sp/>print<sp/>a<sp/>matrix</highlight></codeline>
<codeline lineno="390"><highlight class="comment">void<sp/>PrettyPrintMatrix(std::ostream<sp/>&amp;os,<sp/>const<sp/>Matrix3D<sp/>&amp;a)</highlight></codeline>
<codeline lineno="391"><highlight class="comment">{</highlight></codeline>
<codeline lineno="392"><highlight class="comment"><sp/><sp/>for<sp/>(int<sp/>i<sp/>=<sp/>0;<sp/>i<sp/>&lt;<sp/>3;<sp/>++i)</highlight></codeline>
<codeline lineno="393"><highlight class="comment"><sp/><sp/>{</highlight></codeline>
<codeline lineno="394"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(int<sp/>j<sp/>=<sp/>0;<sp/>j<sp/>&lt;<sp/>3;<sp/>++j)</highlight></codeline>
<codeline lineno="395"><highlight class="comment"><sp/><sp/><sp/><sp/>{</highlight></codeline>
<codeline lineno="396"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>os<sp/>&lt;&lt;<sp/>i<sp/>&lt;&lt;<sp/>&quot;,<sp/>&quot;<sp/>&lt;&lt;<sp/>j<sp/>&lt;&lt;<sp/>&quot;:<sp/>&quot;<sp/>&lt;&lt;<sp/>a(i,<sp/>j)<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
<codeline lineno="397"><highlight class="comment"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="398"><highlight class="comment"><sp/><sp/>}</highlight></codeline>
<codeline lineno="399"><highlight class="comment">}</highlight></codeline>
<codeline lineno="400"><highlight class="comment">*/</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="401"><highlight class="normal"></highlight><highlight class="preprocessor">#endif</highlight></codeline>
    </programlisting>
    <location file="include/TinyMath.hpp"/>
  </compounddef>
</doxygen>
