Difference between revisions of "Vec2f"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Created page with "<onlyinclude> The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates. Vec2f contains two variables '''x''' and '''y'''. <syntaxhighlight l...")
 
Line 5: Line 5:
  
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
Vec2f pos ( 25, 25 )
+
Vec2f pos ( f32, f32 )
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 06:03, 28 September 2012

The Vec2f type is mainly used in the blob for positioning and getting the mouse coordinates.

Vec2f contains two variables x and y.

Vec2f pos ( f32, f32 )

Example

Vec2f pos;
pos = this.getPosition();
pos+50;
this.SetPosition(pos);