Point class
A Point class represents a coordinate or xy pair.
Point::Point()
Creates a Point object p. The Point is initialised to (0, 0) by default.
Point::Point(int32_t x, int32_t y)
Creates a Point object and initialises its coordinates.
int32_t Point::getX()
int32_t Point::getY()
Get the specified Point coordinate.
Point::setX(int32_t x)
Point::setY(int32_t y)
Point::setCoord(int32_t x, int32_t y)
Set the specified Point coordinate.
Point::operator == (const Point &other)
Returns true if the two Points are equal.
Point::operator !=
Returns true if the two Points are not equal.
Point::operator <
Returns true if the first point is 'less than' the second. First the X coordinate is compared; if equal then the Y coordinate is compared.
Point::operator >
Returns true if the first point is 'greater than' the second. First the X coordinate is compared; if equal then the Y coordinate is compared.
Point::operator +
A Point plus a Vector returns a Point transposed by the Vector.
A Point plus a Point returns a Point transposed by the Point.
Point::operator -
A Point minus a Point returns a Vector.
Point::operator -
A Point minus a Vector returns a Point transposed by the Vector.
Point::operator +=
A Point plus a scalar (i.e. an integer) is offset, or moved, by the value of the scalar in both X and Y.
A Point plus a Point returns a Point with the sum of the two Points X and Y values.
Point::operator -=
A Point minus a Point returns a Point with the differrence of the two Points X and Y values.
Point::operator *=
A Point times a scalar is scaled (multiplied) by the scalar.