MyScript Interactive Ink SDK  4.0.0
Point.h
1 // Copyright @ MyScript. All rights reserved.
2 
3 #pragma once
4 
5 #include <iink/Engine.h>
6 
7 #include <iosfwd>
8 
9 namespace myscript {
10 namespace iink {
11 namespace graphics {
12 
16 struct Point
17 {
18  float x = 0.f;
19  float y = 0.f;
24  Point() =default;
25 
32  Point(float x, float y) noexcept : x(x), y(y) {}
33 
41  bool operator==(const Point& other) const noexcept
42  {
43  return x == other.x && y == other.y;
44  }
45 
53  bool operator!=(const Point& other) const noexcept
54  {
55  return x != other.x || y != other.y;
56  }
57 
66  IINK_API friend std::ostream& operator<<(std::ostream& os, const Point& p);
67 };
68 
69 }
70 }
71 }
Definition: Configuration.h:11
Definition: Point.h:17
float x
Definition: Point.h:18
bool operator!=(const Point &other) const noexcept
Definition: Point.h:53
Point(float x, float y) noexcept
Definition: Point.h:32
friend std::ostream & operator<<(std::ostream &os, const Point &p)
float y
Definition: Point.h:19
bool operator==(const Point &other) const noexcept
Definition: Point.h:41