https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/Vec2&feed=atom&action=history
GSDP:GAM100/CProcessing/Vec2 - Revision history
2024-03-28T15:48:55Z
Revision history for this page on the wiki
MediaWiki 1.35.2
https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/Vec2&diff=58217&oldid=prev
>Zachary.logsdon at 16:13, 8 May 2019
2019-05-08T16:13:44Z
<p></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:13, 8 May 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{GSDP:GAM100API.css}}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{GSDP:GAM100API.css}}</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>=<del class="diffchange diffchange-inline">vec2_t</del>=</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>=<ins class="diffchange diffchange-inline">Vec2</ins>=</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Description==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A <del class="diffchange diffchange-inline">vec2_t </del>(2D vector type) is a structure that can hold two float values. This is used for linear algebra, but can be used for any purpose that requires two values. There are a series of operations that can be done using a 2D vector that are also provided.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A <ins class="diffchange diffchange-inline">Vec2 </ins>(2D vector type) is a structure that can hold two float values. This is used for linear algebra, but can be used for any purpose that requires two values. There are a series of operations that can be done using a 2D vector that are also provided.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Example==</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==Example==</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l9" >Line 9:</td>
<td colspan="2" class="diff-lineno">Line 9:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> // create a position vec2</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> // create a position vec2</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">vec2_t </del>position;</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> <ins class="diffchange diffchange-inline">Vec2 </ins>position;</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> // set the position</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> // set the position</div></td></tr>
<!-- diff cache key insidedb135-dpw135:diff::1.12:old-58211:rev-58217 -->
</table>
>Zachary.logsdon
https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/Vec2&diff=58211&oldid=prev
>Zachary.logsdon: New page: {{GSDP:GAM100API.css}} =vec2_t= ==Description== A vec2_t (2D vector type) is a structure that can hold two float values. This is used for linear algebra, but can be used for any purpose th...
2019-05-08T16:12:32Z
<p>New page: {{GSDP:GAM100API.css}} =vec2_t= ==Description== A vec2_t (2D vector type) is a structure that can hold two float values. This is used for linear algebra, but can be used for any purpose th...</p>
<p><b>New page</b></p><div>{{GSDP:GAM100API.css}}<br />
=vec2_t=<br />
==Description==<br />
A vec2_t (2D vector type) is a structure that can hold two float values. This is used for linear algebra, but can be used for any purpose that requires two values. There are a series of operations that can be done using a 2D vector that are also provided.<br />
<br />
==Example==<br />
<syntaxhighlight lang='c'><br />
void update() <br />
{<br />
// create a position vec2<br />
vec2_t position;<br />
<br />
// set the position<br />
position.x = 100;<br />
position.y = 200;<br />
<br />
// scale the position by 1.5<br />
position = vec2_scale(position, 1.5f);<br />
<br />
// draw a rectangle at the position<br />
rect(position.x, position.y, 50, 50);<br />
}<br />
</syntaxhighlight><br />
<br />
====Related====<br />
<br />
* [[GSDP:GAM100/CProcessing |Main Page ]]<br />
* [[GSDP:GAM100/CProcessing/rect() |rect() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2() |vec2() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_zero() |vec2_zero() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_set() |vec2_set() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_neg() |vec2_neg() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_add() |vec2_add() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_sub() |vec2_sub() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_norm() |vec2_norm() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_scale() |vec2_scale() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_length() |vec2_length() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_distance() |vec2_distance() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_dot() |vec2_dot() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_cross() |vec2_cross() ]]<br />
* [[GSDP:GAM100/CProcessing/vec2_angle() |vec2_angle() ]]</div>
>Zachary.logsdon