<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Vector</id>
	<title>GSDP:GAM100/CProcessing/CP Vector - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://inside.digipen.edu/index.php?action=history&amp;feed=atom&amp;title=GSDP%3AGAM100%2FCProcessing%2FCP_Vector"/>
	<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Vector&amp;action=history"/>
	<updated>2026-04-05T21:58:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Vector&amp;diff=60563&amp;oldid=prev</id>
		<title>&gt;J.thiel: New page: =CP_Vector= ==Description== A '''CP_Vector''' (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...</title>
		<link rel="alternate" type="text/html" href="https://inside.digipen.edu/index.php?title=GSDP:GAM100/CProcessing/CP_Vector&amp;diff=60563&amp;oldid=prev"/>
		<updated>2020-06-26T21:11:16Z</updated>

		<summary type="html">&lt;p&gt;New page: =CP_Vector= ==Description== A &amp;#039;&amp;#039;&amp;#039;CP_Vector&amp;#039;&amp;#039;&amp;#039; (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...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=CP_Vector=&lt;br /&gt;
==Description==&lt;br /&gt;
A '''CP_Vector''' (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.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang='c'&amp;gt;&lt;br /&gt;
void update() &lt;br /&gt;
{&lt;br /&gt;
  // create a position vec2&lt;br /&gt;
  CP_Vector position;&lt;br /&gt;
&lt;br /&gt;
  // set the position&lt;br /&gt;
  position.x = 100;&lt;br /&gt;
  position.y = 200;&lt;br /&gt;
&lt;br /&gt;
  // scale the position by 1.5&lt;br /&gt;
  position = CP_Vector_Scale(position, 1.5f);&lt;br /&gt;
&lt;br /&gt;
  // draw a rectangle at the position&lt;br /&gt;
  CP_Graphics_DrawRect(position.x, position.y, 50, 50);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Related====&lt;br /&gt;
&lt;br /&gt;
* [[GSDP:GAM100/CProcessing                         |Main Page               ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Graphics_DrawRect()  |CP_Graphics_DrawRect()  ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Zero()        |CP_Vector_Zero()        ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Set()         |CP_Vector_Set()         ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Negate()      |CP_Vector_Negate()      ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Add()         |CP_Vector_Add()         ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Subtract()    |CP_Vector_Subtract()    ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Normalize()   |CP_Vector_Normalize()   ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Scale()       |CP_Vector_Scale()       ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Length()      |CP_Vector_Length()      ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Distance()    |CP_Vector_Distance()    ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_DotProduct()  |CP_Vector_DotProduct()  ]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_CrossProduct()|CP_Vector_CrossProduct()]]&lt;br /&gt;
* [[GSDP:GAM100/CProcessing/CP_Vector_Angle()       |CP_Vector_Angle()       ]]&lt;/div&gt;</summary>
		<author><name>&gt;J.thiel</name></author>
	</entry>
</feed>