The Battle for Wesnoth  1.17.10+dev
Public Member Functions | List of all members
point Struct Reference

Holds a 2D point. More...

#include <point.hpp>

Inheritance diagram for point:

Public Member Functions

constexpr point ()
 Initialize to 0 by default. More...
 
constexpr point (int x, int y)
 
constexpr point (const SDL_Point &p)
 
constexpr bool operator== (const point &point) const
 
constexpr bool operator!= (const point &point) const
 
constexpr bool operator< (const point &point) const
 
constexpr bool operator<= (const point &point) const
 
constexpr point operator+ (const point &point) const
 
constexpr pointoperator+= (const point &point)
 
constexpr point operator- (const point &point) const
 
constexpr pointoperator-= (const point &point)
 
constexpr point operator* (int s) const
 
constexpr pointoperator*= (int s)
 
constexpr point operator/ (int s) const
 
constexpr pointoperator/= (int s)
 
constexpr point operator* (const point &p) const
 
constexpr pointoperator*= (const point &p)
 
constexpr point operator/ (const point &p) const
 
constexpr pointoperator/= (const point &p)
 

Detailed Description

Holds a 2D point.

This is a thin wrapper over SDL_Point.

Definition at line 24 of file point.hpp.

Constructor & Destructor Documentation

◆ point() [1/3]

constexpr point::point ( )
inline

Initialize to 0 by default.

Definition at line 27 of file point.hpp.

◆ point() [2/3]

constexpr point::point ( int  x,
int  y 
)
inline

Definition at line 29 of file point.hpp.

◆ point() [3/3]

constexpr point::point ( const SDL_Point &  p)
inline

Definition at line 31 of file point.hpp.

Member Function Documentation

◆ operator!=()

constexpr bool point::operator!= ( const point point) const
inline

Definition at line 38 of file point.hpp.

References operator==().

◆ operator*() [1/2]

constexpr point point::operator* ( int  s) const
inline

Definition at line 77 of file point.hpp.

References s.

◆ operator*() [2/2]

constexpr point point::operator* ( const point p) const
inline

Definition at line 103 of file point.hpp.

◆ operator*=() [1/2]

constexpr point& point::operator*= ( int  s)
inline

Definition at line 82 of file point.hpp.

References s.

◆ operator*=() [2/2]

constexpr point& point::operator*= ( const point p)
inline

Definition at line 108 of file point.hpp.

◆ operator+()

constexpr point point::operator+ ( const point point) const
inline

Definition at line 53 of file point.hpp.

◆ operator+=()

constexpr point& point::operator+= ( const point point)
inline

Definition at line 58 of file point.hpp.

◆ operator-()

constexpr point point::operator- ( const point point) const
inline

Definition at line 65 of file point.hpp.

◆ operator-=()

constexpr point& point::operator-= ( const point point)
inline

Definition at line 70 of file point.hpp.

◆ operator/() [1/2]

constexpr point point::operator/ ( int  s) const
inline

Definition at line 89 of file point.hpp.

References s.

◆ operator/() [2/2]

constexpr point point::operator/ ( const point p) const
inline

Definition at line 115 of file point.hpp.

◆ operator/=() [1/2]

constexpr point& point::operator/= ( int  s)
inline

Definition at line 94 of file point.hpp.

References s.

◆ operator/=() [2/2]

constexpr point& point::operator/= ( const point p)
inline

Definition at line 120 of file point.hpp.

References operator<<().

◆ operator<()

constexpr bool point::operator< ( const point point) const
inline

Definition at line 43 of file point.hpp.

◆ operator<=()

constexpr bool point::operator<= ( const point point) const
inline

Definition at line 48 of file point.hpp.

◆ operator==()

constexpr bool point::operator== ( const point point) const
inline

Definition at line 33 of file point.hpp.

Referenced by operator!=().


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