<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jimandi.com/SDK/index.php?action=history&amp;feed=atom&amp;title=Vector2D</id>
	<title>Vector2D - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://jimandi.com/SDK/index.php?action=history&amp;feed=atom&amp;title=Vector2D"/>
	<link rel="alternate" type="text/html" href="https://jimandi.com/SDK/index.php?title=Vector2D&amp;action=history"/>
	<updated>2026-10-25T11:57:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.2</generator>
	<entry>
		<id>https://jimandi.com/SDK/index.php?title=Vector2D&amp;diff=70&amp;oldid=prev</id>
		<title>WikiSysop: Created page with &quot;link=Low Level Geometry Category:SDK This object represents a 2D vector (X and Y values only). It is used by many other objects and can also b...&quot;</title>
		<link rel="alternate" type="text/html" href="https://jimandi.com/SDK/index.php?title=Vector2D&amp;diff=70&amp;oldid=prev"/>
		<updated>2021-08-04T03:32:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/SDK/index.php/File:Back.jpg&quot; title=&quot;File:Back.jpg&quot;&gt;right|50px|link=Low Level Geometry&lt;/a&gt; &lt;a href=&quot;/SDK/index.php?title=Category:SDK&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Category:SDK (page does not exist)&quot;&gt;Category:SDK&lt;/a&gt; This object represents a 2D vector (X and Y values only). It is used by many other objects and can also b...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[File:Back.jpg|right|50px|link=Low Level Geometry]]&lt;br /&gt;
[[Category:SDK]]&lt;br /&gt;
This object represents a 2D vector (X and Y values only). It is used by many other objects and can also be used with other geometry objects such as Point2D to perform calculations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Constructor==&lt;br /&gt;
&lt;br /&gt;
===Vector2D()===&lt;br /&gt;
This construct an uninitialised vector with invalid x and y values which can be tested for using the .IsInvalid property.&lt;br /&gt;
&lt;br /&gt;
===Vector2D(double x, double y)===&lt;br /&gt;
A vector point with the specified X and Y values x(double) the value for the x coordinate of the vector y(double) the value for the y coordinate of the vector&lt;br /&gt;
&lt;br /&gt;
===Vector2D(Vector2D vec)===&lt;br /&gt;
A new vector with the same X and Y values as the passed vector vec Vector2D Note:an existing vector to copy X and Y values from&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Properties==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===.IsInvalid=== &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' (bool) true if the vector is invalid Note: not initialised or:SetInvalid called&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===.Length=== &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' (the length of the vector)&lt;br /&gt;
&lt;br /&gt;
===.LengthSq=== &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' (the length squared of the vector. If comparing distance between points etc. using LengthSq instead of Length will be faster as it avoids the square root operation required to find the exact length.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===.X or .x=== &lt;br /&gt;
'''Interaction:''' Read and Write:&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''(double) x coordinate for point&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===.Y  or .y=== &lt;br /&gt;
'''Interaction:''' Read and Write&lt;br /&gt;
&lt;br /&gt;
'''Returns:'''(double) y coordinate for point&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:Cross( Vector2D vec)===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' (the cross product (a Vector3D) of this vector and passed vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:Dot( Vector2D vec)===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Returns:''' (the dot product (a double value) of this vector and passed vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:Normalize()===&lt;br /&gt;
Normalize this vector to make it a unit vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:NormalTo()===&lt;br /&gt;
'''Returns:''' (a new vector &amp;lt;q&amp;gt;normal&amp;lt;/q&amp;gt; to this vector found by rotating vector 90 degrees clockwise&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:Set( double x, double y)===&lt;br /&gt;
Set both the x and y values for the vector x(double) new x value for vector y(double) new y value for vector&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===:SetInvalid()===&lt;br /&gt;
Set the vector to invalid state X and Y will be lost&lt;br /&gt;
&lt;br /&gt;
==Operations==&lt;br /&gt;
===Double * Vector2D===&lt;br /&gt;
'''Returns:''' a new vector multiplied by double value&lt;br /&gt;
&lt;br /&gt;
===Matrix2D * Vector2D===&lt;br /&gt;
Multiplying a matrix by a point returns a transformed vector&lt;br /&gt;
&lt;br /&gt;
===Vector2D + Vector2D===&lt;br /&gt;
Adding a vector to a vector will returns a new vector.&lt;br /&gt;
&lt;br /&gt;
===Vector2D - Vector2D===&lt;br /&gt;
Subtracting a vector from a point will returns a new vector.&lt;br /&gt;
&lt;br /&gt;
=== - Vector2D===&lt;br /&gt;
Negates x,y values of vector (reverses vector direction)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Back.jpg|right|50px|link=Low Level Geometry]]&lt;br /&gt;
==References==&lt;br /&gt;
'''Please Note:''' The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at [https://gadgets.vectric.com/developerinfo.html Vertric Developer Information]&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>