openEmbroider  0.1
an open source embroidery software
vector_2d Struct Reference

Public Member Functions

 vector_2d (float _x, float _y)
 
vector_2d operator* (const vector_2d &pt) const
 
vector_2d operator* (const float val)
 
vector_2d operator/ (const vector_2d &pt) const
 
vector_2d operator/ (const float val)
 
vector_2d operator+ (const vector_2d pt) const
 
vector_2d operator+ (const float val) const
 
vector_2d operator- (const vector_2d pt) const
 
vector_2d operator- (const float val) const
 
void normalize ()
 normalise the vector (his length become 1)
 
void turnRight ()
 turn the vector 90° to the right
 
void turnLeft ()
 
float len ()
 parse the xml file to load params More...
 

Public Attributes

float x
 
float y
 

Member Function Documentation

float vector_2d::len ( )
inline

parse the xml file to load params

Returns
true the length of the vector (always >=0)

The documentation for this struct was generated from the following file: