teditor
1.8.0@@fee5e94
Terminal based editor written in C++
|
Go to the documentation of this file.
27 return (
y > b.
y) || (
y == b.
y &&
x > b.
x);
31 return (
y > b.
y) || (
y == b.
y &&
x >= b.
x);
35 return (
x == b.
x) && (
y == b.
y);
39 return (
x != b.
x) || (
y != b.
y);
43 return (
y < b.
y) || (
y == b.
y &&
x <= b.
x);
47 return (
y < b.
y) || (
y == b.
y &&
x < b.
x);
64 }
else if(
y > other.
y) {
69 start = {std::min(
x, other.
x),
y};
70 end = {std::max(
x, other.
x),
y};
77 for(
const auto& c : chars) {
92 if (
y == -1 &&
x == -1)
return false;
95 if(start.
y < _y && _y < end.
y)
return true;
96 else if(start.
y == end.
y && start.
y == _y) {
97 if(start.
x <= _x && _x <= end.
x)
return true;
98 }
else if(start.
y == _y && _x >= start.
x)
return true;
99 else if(end.
y == _y && _x <= end.
x)
return true;
bool operator==(const Pos2d< T > &b) const
Definition: pos2d.h:34
bool operator<=(const Pos2d< T > &b) const
Definition: pos2d.h:42
const Pos2d< T > & operator=(const Pos2d< T > &in)
Definition: pos2d.h:20
bool operator<(const Pos2d< T > &b) const
Definition: pos2d.h:46
T y
Definition: pos2d.h:16
Pos2d< size_t > Pos2ds
Definition: pos2d.h:110
T DataT
Definition: pos2d.h:14
Pos2d< int > Pos2di
Definition: pos2d.h:106
Any 2D position.
Definition: pos2d.h:13
int find(Pos2d< T > &start, Pos2d< T > &end, const Pos2d< T > &other) const
Finds the start/end points for the range defined by this and the other position.
Definition: pos2d.h:59
bool operator>=(const Pos2d< T > &b) const
Definition: pos2d.h:30
bool isInside(int _y, int _x, const Pos2d< T > &cu) const
Check if the given location is in the regions.
Definition: pos2d.h:91
Pos2d(T x_=0, T y_=0)
Definition: pos2d.h:18
bool operator!=(const Pos2d< T > &b) const
Definition: pos2d.h:38
Pos2di Point
Definition: pos2d.h:112
Pos2d< unsigned > Pos2du
Definition: pos2d.h:108
T x
Definition: pos2d.h:16
Pos2d & operator+=(const std::string &chars)
Definition: pos2d.h:76
bool operator>(const Pos2d< T > &b) const
Definition: pos2d.h:26