#include <point.h>
Public Member Functions | |
Point () | |
Construct a point at (0, 0). | |
Point (int x_, int y_) | |
Construct a point. | |
Point & | operator+= (const Point &p) |
Shift a point. | |
Point & | operator-= (const Point &p) |
Shift a point. | |
Point | operator- () const |
return the negative of a point | |
Public Attributes | |
int | x |
The point's x coordinate. | |
int | y |
The point's y coordinate. | |
Friends | |
Point | operator+ (const Point &p, const Point &q) |
Return a shifted point. | |
Point | operator- (const Point &p, const Point &q) |
Return a shifted point. | |
bool | operator== (const Point &p, const Point &q) |
Compare two points. | |
bool | operator!= (const Point &p, const Point &q) |
Compare two points. | |
bool | operator< (const Point &p, const Point &q) |
for std::map only | |
std::ostream & | operator<< (std::ostream &s, const Point &p) |
Print a point to a stream. |
This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.