mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-26 09:02:44 -06:00
Merge pull request #4151 from FearlessTobi/port-987
Port #987 from yuzu: "vector_math: Use variable template version of is_signed in Vec classes"
This commit is contained in:
commit
a62e830ebf
1 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ public:
|
|||
}
|
||||
|
||||
template <typename U = T>
|
||||
constexpr Vec2<std::enable_if_t<std::is_signed<U>::value, U>> operator-() const {
|
||||
constexpr Vec2<std::enable_if_t<std::is_signed_v<U>, U>> operator-() const {
|
||||
return {-x, -y};
|
||||
}
|
||||
constexpr Vec2<decltype(T{} * T{})> operator*(const Vec2& other) const {
|
||||
|
@ -235,7 +235,7 @@ public:
|
|||
}
|
||||
|
||||
template <typename U = T>
|
||||
constexpr Vec3<std::enable_if_t<std::is_signed<U>::value, U>> operator-() const {
|
||||
constexpr Vec3<std::enable_if_t<std::is_signed_v<U>, U>> operator-() const {
|
||||
return {-x, -y, -z};
|
||||
}
|
||||
|
||||
|
@ -448,7 +448,7 @@ public:
|
|||
}
|
||||
|
||||
template <typename U = T>
|
||||
constexpr Vec4<std::enable_if_t<std::is_signed<U>::value, U>> operator-() const {
|
||||
constexpr Vec4<std::enable_if_t<std::is_signed_v<U>, U>> operator-() const {
|
||||
return {-x, -y, -z, -w};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue