<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Vec2</id>
	<title>Vec2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=Vec2"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Vec2&amp;action=history"/>
	<updated>2026-04-22T00:35:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=Vec2&amp;diff=143&amp;oldid=prev</id>
		<title>Anders at 07:53, 6 July 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Vec2&amp;diff=143&amp;oldid=prev"/>
		<updated>2025-07-06T07:53:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:53, 6 July 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;{{:Vec2ExampleCode}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;{{:Vec2ExampleCode}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Example==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;syntaxhighlight lang=&quot;lua&quot;&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local vec = Vec2(2,9.2)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;local anotherVec = vec + (Vec2(-2,-2) * 2)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==Members==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;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;&quot;&gt;&lt;div&gt;==Members==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-48:rev-143:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=Vec2&amp;diff=48&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;{{:Vec2ExampleCode}} ==Example== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; local vec = Vec2(2,9.2) local anotherVec = vec + (Vec2(-2,-2) * 2) &lt;/syntaxhighlight&gt;  ==Members== {| class=&quot;wikitable&quot;  !|type !|variable !|description |- |float |x | |- |float |y | |- |}  ==Constructor== {| class=&quot;wikitable&quot; !|function !|description |- |Vec2(float x, float y) | |- |Vec2(float value) | |- |Vec2(Vec2 vector) | |- |Vec2() | |- |}  ==Functions== {| class=&quot;wikitable&quot; !|return !|function !|des...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=Vec2&amp;diff=48&amp;oldid=prev"/>
		<updated>2025-07-05T13:38:06Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{:Vec2ExampleCode}} ==Example== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; local vec = Vec2(2,9.2) local anotherVec = vec + (Vec2(-2,-2) * 2) &amp;lt;/syntaxhighlight&amp;gt;  ==Members== {| class=&amp;quot;wikitable&amp;quot;  !|type !|variable !|description |- |float |x | |- |float |y | |- |}  ==Constructor== {| class=&amp;quot;wikitable&amp;quot; !|function !|description |- |Vec2(float x, float y) | |- |Vec2(float value) | |- |Vec2(&lt;a href=&quot;/index.php/Vec2&quot; title=&quot;Vec2&quot;&gt;Vec2&lt;/a&gt; vector) | |- |Vec2() | |- |}  ==Functions== {| class=&amp;quot;wikitable&amp;quot; !|return !|function !|des...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{:Vec2ExampleCode}}&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vec = Vec2(2,9.2)&lt;br /&gt;
local anotherVec = vec + (Vec2(-2,-2) * 2)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Members==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!|type&lt;br /&gt;
!|variable&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|x&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|y&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Constructor==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|Vec2(float x, float y)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Vec2(float value)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Vec2([[Vec2]] vector)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|Vec2()&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:dot()|dot]]()&lt;br /&gt;
|Returns the dot product of this vec with itself.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:dot(Vec2 vector)|dot]]([[Vec2]] vector)&lt;br /&gt;
|Return the dot product of this with vector.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:angle(Vec2 vector)|angle]]([[Vec2]] vector)&lt;br /&gt;
|Return the angle bettwen the two vectors.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:length()|length]]()&lt;br /&gt;
|Returns the length of this vector.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:getXYDist()|getXYDist]]()&lt;br /&gt;
|Returns x + y.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:negate()|negate]]()&lt;br /&gt;
|Negate the vector.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:clear()|clear]]()&lt;br /&gt;
|Set vector to zero.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:infinity()|infinity]]()&lt;br /&gt;
|Set vector to infinity.&lt;br /&gt;
|-&lt;br /&gt;
|float&lt;br /&gt;
|[[Vec2:normalize()|normalize]]()&lt;br /&gt;
|Normalize the vector and return the old length.&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2:normalizeV()|normalizeV]]()&lt;br /&gt;
|Return a copy and normalize the return vec.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:interPolate(Vec2 vector1, Vec2 vector2, float weight)|interPolate]]([[Vec2]] vector1, [[Vec2]] vector2, float weight)&lt;br /&gt;
|Inter polate a vector bettwen two values. weight 0 returns vector1 and at weight 1 vector2 is returned&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2:interPolateV(Vec2 vector1, Vec2 vector2, float weight)|interPolateV]]([[Vec2]] vector1, [[Vec2]] vector2, float weight)&lt;br /&gt;
|Returns a Inter polate a vector bettwen two values. weight 0 returns vector1 and at weight 1 vector2 is returned&lt;br /&gt;
Return (vector1 * weight) + (vector2 * (1-weight));&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Vec2:isZero()|isZero]]()&lt;br /&gt;
|Returns true when vector length is zero&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Vec2:isInfinity()|isInfinity]]()&lt;br /&gt;
|Returns true when vetor length is infinity&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:minimize(Vec2 vec)|minimize]]([[Vec2]] vector)&lt;br /&gt;
|Keep the minimum x and y value from this vector and vec.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|[[Vec2:maximize(Vec2 vec)|maximize]]([[Vec2]] vector)&lt;br /&gt;
|Keep the maximum x and y value from this vector and vec.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Operators==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
!|return&lt;br /&gt;
!|function&lt;br /&gt;
!|description&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2]] + [[Vec2]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2]] - [[Vec2]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2]] * float&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|[[Vec2]]&lt;br /&gt;
|[[Vec2]] / float&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|bool&lt;br /&gt;
|[[Vec2]] == float&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>