I wrote a small coordinate class to handle both int and float coordinates.
template
class vector2
{
public:
vector2() { memset(this, 0, s
dirkgently is correct. However rather that constructing x and y with 0, an explicit call to the default constructor will set intrinsic types to 0 and allow the template to be used for structs and classes with a default constructor.
template
class vector2
{
public:
// use initializer lists
vector2() : x(), y() {}
T x;
T y;
};