Terminal++  3.1.0.3
A C++ library for interacting with ANSI terminal windows
Public Member Functions | Public Attributes | Friends | List of all members
terminalpp::point Struct Reference

A class that represents a position in space. More...

#include <point.hpp>

Inheritance diagram for terminalpp::point:

Public Member Functions

constexpr point ()
 Default Constructor. More...
 
constexpr point (coordinate_type x, coordinate_type y)
 Constructor. More...
 
constexpr pointoperator+= (point const &rhs)
 Addition.
 
constexpr pointoperator-= (point const &rhs)
 Subtraction.
 

Public Attributes

coordinate_type x_
 
coordinate_type y_
 

Friends

constexpr friend bool operator< (point const &lhs, point const &rhs)
 Less-than operator.
 
constexpr friend bool operator== (point const &lhs, point const &rhs)
 Equality operator.
 

Detailed Description

A class that represents a position in space.

A class that represents a position in space, where x is the co-ordinate along the horizontal axis and y being the co-ordinate along the vertical axis.

Constructor & Destructor Documentation

◆ point() [1/2]

constexpr terminalpp::point::point ( )
inlineconstexpr

Default Constructor.

Constructs a point, leaving the values uninitialized.

◆ point() [2/2]

constexpr terminalpp::point::point ( coordinate_type  x,
coordinate_type  y 
)
inlineconstexpr

Constructor.

Constructs a point from a passed in x co-ordinate and a passed in y co-ordinate.

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