mp_traversals
Terrible Traversals
Point Struct Reference

Simple Point class containing a public unsigned x and y for representing 2D points on an image. More...

#include <Point.h>

Public Member Functions

 Point ()
 Default constructor, set the point to (0, 0) More...
 
 Point (unsigned x, unsigned y)
 Constructor. More...
 
bool operator< (const Point &other) const
 overload operator < More...
 
bool operator== (const Point &other) const
 overload operator == More...
 

Public Attributes

unsigned x
 
unsigned y
 

Detailed Description

Simple Point class containing a public unsigned x and y for representing 2D points on an image.

Constructor & Destructor Documentation

◆ Point() [1/2]

Point::Point ( )
inline

Default constructor, set the point to (0, 0)

◆ Point() [2/2]

Point::Point ( unsigned  x,
unsigned  y 
)
inline

Constructor.

Parameters
xcoordinate of a point
ycoordinate of a point

Member Function Documentation

◆ operator<()

bool Point::operator< ( const Point other) const
inline

overload operator <

Parameters
otherThe other point
Returns
True for smaller, false for otherwise

◆ operator==()

bool Point::operator== ( const Point other) const
inline

overload operator ==

Parameters
otherThe other point
Returns
True for smaller, false for otherwise

Member Data Documentation

◆ x

unsigned Point::x

◆ y

unsigned Point::y

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