Pogosim
Loading...
Searching...
No Matches
GridCell Struct Reference

Represents a cell in a spatial grid. More...

#include <distances.h>

Public Member Functions

bool operator== (const GridCell &other) const
 Compares two GridCell objects for equality.

Public Attributes

int x
int y
 The x and y coordinates of the grid cell.

Detailed Description

Represents a cell in a spatial grid.

A GridCell is defined by its integer coordinates (x, y) and is used in spatial hashing to partition a 2D space into discrete cells.

Member Function Documentation

◆ operator==()

bool GridCell::operator== ( const GridCell & other) const
inline

Compares two GridCell objects for equality.

Parameters
otherThe other GridCell to compare against.
Returns
true if both the x and y coordinates are equal.
false otherwise.

Member Data Documentation

◆ x

int GridCell::x

◆ y

int GridCell::y

The x and y coordinates of the grid cell.


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