#ifndef VEC2_HPP #define VEC2_HPP #include // Inline constant – visible to every translation unit. inline constexpr double pi = 3.14159265358979323846; struct Vec2 { double x{}; double y{}; // Defaulted constructors. Vec2() = default; Vec2(double x_, double y_); // Returns the squared length – useful for comparisons. double length_sq() const; // Returns the Euclidean length. double length() const; // Adds another vector to this one. void add(const Vec2& other); }; #endif // VEC2_HPP