| 113 | |
| 114 | static inline float dot(Vec2 lhs, Vec2 rhs) { return lhs.x * rhs.x + lhs.y * rhs.y; } |
| 115 | static inline float length(Vec2 v) { return std::sqrt(dot(v, v)); } |
| 116 | static inline Vec2 normalize(Vec2 v) { float len = length(v); return Vec2{ v.x / len, v.y / len }; } |
| 117 | |
| 118 |
no test coverage detected