te::gm::Coord2D Struct Reference

An utility struct for representing 2D coordinates. More...

#include <Coord2D.h>

Public Member Functions

 Coord2D ()
 Constructor. More...
 
 Coord2D (const double &xx, const double &yy)
 Constructor. More...
 
 Coord2D (const Coord2D &rhs)
 Copy constructor. More...
 
double getX () const
 It returns the x-coordinate. More...
 
double getY () const
 It returns the y-coordinate. More...
 
bool operator< (const Coord2D &rhs) const
 Lexicographic compare (x-y). More...
 
bool operator== (const Coord2D &rhs) const
 It compares if two coordinates have the same exact values. More...
 

Public Attributes

double x
 x-coordinate. More...
 
double y
 y-coordinate. More...
 

Detailed Description

An utility struct for representing 2D coordinates.

Definition at line 40 of file Coord2D.h.

Constructor & Destructor Documentation

◆ Coord2D() [1/3]

te::gm::Coord2D::Coord2D ( )
inline

Constructor.

Definition at line 43 of file Coord2D.h.

◆ Coord2D() [2/3]

te::gm::Coord2D::Coord2D ( const double &  xx,
const double &  yy 
)
inline

Constructor.

Parameters
xxThe x-coordinate.
yyThe y-coordinate.

Definition at line 51 of file Coord2D.h.

◆ Coord2D() [3/3]

te::gm::Coord2D::Coord2D ( const Coord2D rhs)
inline

Copy constructor.

Parameters
rhsThe right-hand-side instance.

Definition at line 62 of file Coord2D.h.

Member Function Documentation

◆ getX()

double te::gm::Coord2D::getX ( ) const
inline

It returns the x-coordinate.

Definition at line 102 of file Coord2D.h.

References x.

◆ getY()

double te::gm::Coord2D::getY ( ) const
inline

It returns the y-coordinate.

Definition at line 108 of file Coord2D.h.

References y.

◆ operator<()

bool te::gm::Coord2D::operator< ( const Coord2D rhs) const
inline

Lexicographic compare (x-y).

Definition at line 87 of file Coord2D.h.

References x, and y.

◆ operator==()

bool te::gm::Coord2D::operator== ( const Coord2D rhs) const
inline

It compares if two coordinates have the same exact values.

Parameters
rhsThe right-hand-side coordinate.
Returns
True if they have exact the same values.

Definition at line 75 of file Coord2D.h.

References x, and y.

Member Data Documentation

◆ x

◆ y


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