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