2
3
4
5
6
7
8
9
10
11
12
13
14
15
17#ifndef MIR_GEOMETRY_POINT_H_
18#define MIR_GEOMETRY_POINT_H_
51 template<
typename XType,
typename YType>
52 constexpr Point(XType&& x, YType&& y) :
x(x),
y(y) {}
61 return lhs.x == rhs.x && lhs.y == rhs.y;
67 return lhs.x != rhs.x || lhs.y != rhs.y;
91std::ostream& operator<<(std::ostream& out,
Point<T>
const& value)
93 out << value.x <<
", " << value.y;
Point< T > & operator+=(Point< T > &lhs, DeltaX< T > rhs)
Definition point.h:81
constexpr bool operator==(Point< T > const &lhs, Point< T > const &rhs)
Definition point.h:59
Point< T > & operator-=(Point< T > &lhs, DeltaX< T > rhs)
Definition point.h:86
constexpr Point< T > operator-(Point< T > lhs, DeltaX< T > rhs)
Definition point.h:76
constexpr Point< T > operator-(Point< T > lhs, DeltaY< T > rhs)
Definition point.h:78
constexpr bool operator!=(Point< T > const &lhs, Point< T > const &rhs)
Definition point.h:65
Point< T > & operator-=(Point< T > &lhs, DeltaY< T > rhs)
Definition point.h:88
constexpr Point< T > operator+(Point< T > lhs, DeltaY< T > rhs)
Definition point.h:73
constexpr Point< T > operator+(Point< T > lhs, DeltaX< T > rhs)
Definition point.h:71
Point< T > & operator+=(Point< T > &lhs, DeltaY< T > rhs)
Definition point.h:83
Basic geometry types. Types for dimensions, displacements, etc. and the operations that they support.
Definition size.h:27
X< T > x
Definition point.h:54
constexpr Point(Point< U > const &other) noexcept
Definition point.h:45
Y< T > y
Definition point.h:55
Point & operator=(Point const &)=default
constexpr Point()=default
constexpr Point(Point const &)=default
constexpr Point(XType &&x, YType &&y)
Definition point.h:52