29 #ifndef NOMLIB_POINT2D_HEADERS
30 #define NOMLIB_POINT2D_HEADERS
34 #include "nomlib/config.hpp"
38 const std::string point_delimiter =
", ";
46 Point2 (
void ) : x ( 0 ), y ( 0 ) {}
52 Point2 ( T x, T y ) : x ( x ), y ( y ) {}
58 this->x =
static_cast<T
> ( copy.x );
59 this->y =
static_cast<T
> ( copy.y );
82 std::ostream& operator << ( std::ostream& os, const Point2<T>& coords )
84 os << coords.x << point_delimiter
90 typedef Point2<int32> Point2i;
93 typedef Point2<uint32> Point2u;
96 typedef Point2<float> Point2f;
99 typedef Point2<double> Point2d;
104 #endif // include guard defined
Point2(void)
Default constructor; sets all values to their respective defaults.
Point2 & operator=(const T &other)
Copy assignment operator.
Point2(T x, T y)
Constructor variant for initializing x, y at construction.