Copied Vector2 utility class from the pre-refactor project