Structure representing a 2D vector.
More...
#include <CellGrid.hpp>
Structure representing a 2D vector.
Definition at line 14 of file CellGrid.hpp.
◆ Vec2D()
Grid2D::Vec2D::Vec2D |
( |
int |
x_, |
|
|
int |
y_ |
|
) |
| |
|
inline |
Constructor to initialize the vector with given coordinates.
- Parameters
-
x_ | X-coordinate |
y_ | Y-coordinate |
Definition at line 23 of file CellGrid.hpp.
◆ operator==()
bool Grid2D::Vec2D::operator== |
( |
Vec2D |
v | ) |
|
|
inline |
Equality operator to compare two Vec2D objects.
- Parameters
-
- Returns
- True if both vectors have the same coordinates, false otherwise.
Definition at line 42 of file CellGrid.hpp.
◆ x()
int Grid2D::Vec2D::x |
( |
| ) |
const |
|
inline |
Get the X-coordinate.
- Returns
- X-coordinate
Definition at line 29 of file CellGrid.hpp.
◆ y()
int Grid2D::Vec2D::y |
( |
| ) |
const |
|
inline |
Get the Y-coordinate.
- Returns
- Y-coordinate
Definition at line 35 of file CellGrid.hpp.
◆ xc
int Grid2D::Vec2D::xc = 0 |
◆ yc
int Grid2D::Vec2D::yc = 0 |
The documentation for this struct was generated from the following file: