srb2::math::Vec2: constexpr constructors

This commit is contained in:
James R 2023-11-27 04:27:19 -08:00
parent 29c92b8c31
commit aa00359ab2

View file

@ -22,9 +22,9 @@ struct Vec2
{
T x, y;
Vec2() : x{}, y{} {}
Vec2(T x_, T y_) : x(x_), y(y_) {}
Vec2(T z) : x(z), y(z) {}
constexpr Vec2() : x{}, y{} {}
constexpr Vec2(T x_, T y_) : x(x_), y(y_) {}
constexpr Vec2(T z) : x(z), y(z) {}
template <typename U>
Vec2(const Vec2<U>& b) : Vec2(b.x, b.y) {}