42 std::ostringstream ss;
43 ss <<
"{ " <<
X <<
", " <<
Y <<
" }";
76 return Point(*
this) += point;
81 return Point(*
this) -= point;
86 return ((
X == point.
X) && (
Y == point.
Y));
91 return !((
X == point.
X) && (
Y == point.
Y));
Defines a point in 2D space.
bool operator==(const Point &point) const
Determines if two points are equal.
Point & operator-=(const Point &point)
Subtracts a point.
void Set(const int x, const int y)
Sets the components of the point.
const Vector2 ToVector2() const
Converts the point into a vector.
Point(const int x=0, const int y=0)
Instantiates a new point object.
const Point operator-(const Point &point) const
Subtracts a point from another.
int X
The x-coordinate of the point.
bool operator!=(const Point &point) const
Determines if two points are not equal.
int Y
The y-coordinate of the point.
Point & operator=(const Point &point)
Assigns the reference of a point.
std::string ToString() const
Gets a string representation of the point.
const Point operator+(const Point &point) const
Adds two points.
static const Point Origin
A point located at the origin.
Point & operator+=(const Point &point)
Adds a point.
Defines a vector with 2 components (x and y).
Katana Engine is a library of classes, interfaces, and value types that provides a foundation for dev...