Skip to content

Commit

Permalink
wip2
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyas committed Sep 16, 2024
1 parent 06737bb commit 6682ec1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/common/math/Vec2.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ struct Vec2 {
constexpr explicit Vec2() = default;
constexpr Vec2(T inX, T inY) : x(inX), y(inY) {}

#ifdef _MSC_VER
// MSVC has skill issues
template<typename U>
constexpr Vec2(U inX, U inY)
: x(static_cast<T>(inX))
, y(static_cast<T>(inY))
{}
#endif

static constexpr Vec2 zero() {
return Vec2();
}
Expand Down

0 comments on commit 6682ec1

Please sign in to comment.