I wrote a small coordinate class to handle both int and float coordinates.
template
class vector2
{
public:
vector2() { memset(this, 0, s
Don't try to be smarter than the compiler. Use the initializer lists as intended by the language. The compiler knows how to efficiently initialize basic types.
If you would try your memset hack on a class with virtual functions you would most likely overwrite the vtable ending up in a disaster. Don't use hack like that, they are a maintenance nightmare.