Terminal++ 3.1.0.4
A C++ library for interacting with ANSI terminal windows
All Classes Namespaces Functions Variables Typedefs Friends Pages Concepts
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>

Public Member Functions

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

Public Attributes

coordinate_type y_
 
coordinate_type x_
 

Friends

constexpr friend auto operator+ (point lhs, point const &rhs) noexcept
 Addition.
 
constexpr friend auto operator- (point lhs, point const &rhs) noexcept
 Subtraction.
 
constexpr friend auto operator<=> (point const &lhs, point const &rhs) noexcept=default
 Relational operators for points.
 

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 
)
inlineconstexprnoexcept

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: