Represents a coordinate pair (e.g, x & y) This class is represented as a low-precision point, because this data type tends to be most easily drawn to a simple canvas.  
 More...
#include <CTurtle.hpp>
|  | 
|  | ivec2 () | 
|  | Empty constructor. Initializes X and Y to both equal 0. 
 | 
|  | 
|  | ivec2 (int x, int y) | 
|  | Assignment cons tructor. 
 | 
|  | 
| int & | operator[] (int index) | 
|  | Array access operator overload. Useful for convenience. 
 | 
|  | 
| int | operator[] (int index) const | 
|  | Array access operator overload. Useful for convenience. 
 | 
|  | 
| ivec2 | operator+ (const ivec2 &other) const | 
|  | 
| ivec2 & | operator+= (const ivec2 &other) | 
|  | 
| ivec2 | operator- (const ivec2 &other) const | 
|  | 
| ivec2 & | operator-= (const ivec2 &other) | 
|  | 
| bool | operator== (const ivec2 &other) const | 
|  | Comparison operator between this vector and the other specified. 
 | 
|  | 
|  | 
| union { |  | 
|  | 
| struct { |  | 
|  | 
| int   x |  | 
|  | 
| int   y |  | 
|  | 
| } |  |  | 
|  | 
| int   data [2] |  | 
|  | 
| }; |  |  | 
|  | 
Represents a coordinate pair (e.g, x & y) This class is represented as a low-precision point, because this data type tends to be most easily drawn to a simple canvas. 
◆ ivec2()
  
  | 
        
          | cturtle::ivec2::ivec2 | ( | int | x, |  
          |  |  | int | y ) |  | inline | 
 
Assignment cons tructor. 
- Parameters
- 
  
    | x | The X value of this ivec2. |  | y | The Y value of this ivec2. |  
 
 
 
◆ operator[]() [1/2]
  
  | 
        
          | int & cturtle::ivec2::operator[] | ( | int | index | ) |  |  | inline | 
 
Array access operator overload. Useful for convenience. 
- Parameters
- 
  
    | index | The index of one of the components of this ivec2 (0..1) |  
 
- Returns
- A reference to the index 
 
 
◆ operator[]() [2/2]
  
  | 
        
          | int cturtle::ivec2::operator[] | ( | int | index | ) | const |  | inline | 
 
Array access operator overload. Useful for convenience. 
- Parameters
- 
  
    | index | The index of one of the components of this ivec2 (0..1) |  
 
- Returns
- A reference to the index 
 
 
The documentation for this struct was generated from the following file: