improved Vec2 class