g13gui/g13d/coord.h
June Tate-Gans 1918d6875c g13d: Reformat all the files to Google style
This is closer to what I'm looking for, and gives us a style guide to boot.
2021-04-25 20:30:56 -05:00

28 lines
362 B
C++

#ifndef COORD_H
#define COORD_H
namespace G13 {
template <class T>
class Coord {
public:
Coord() : x(), y() {
}
Coord(T _x, T _y) : x(_x), y(_y) {
}
T x;
T y;
};
template <class T>
std::ostream &operator<<(std::ostream &o, const Coord<T> &c) {
o << "{ " << c.x << " x " << c.y << " }";
return o;
};
} // namespace G13
#endif // COORD_H