Generic vec2 class