Unravel Engine C++ Reference
Loading...
Searching...
No Matches
coord.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace input
4{
5struct coord
6{
7 int x;
8 int y;
9
10 coord(int x = 0, int y = 0) : x(x), y(y)
11 {
12 }
13};
14
15inline auto operator==(const coord& p1, const coord& p2) -> bool
16{
17 return p1.x == p2.x && p1.y == p2.y;
18}
19
20inline auto operator!=(const coord& p1, const coord& p2) -> bool
21{
22 return p1.x != p2.x || p1.y != p2.y;
23}
24} // namespace input
auto operator!=(const coord &p1, const coord &p2) -> bool
Definition coord.hpp:20
auto operator==(const coord &p1, const coord &p2) -> bool
Definition coord.hpp:15
coord(int x=0, int y=0)
Definition coord.hpp:10