mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-25 21:06:58 -05:00
Merge pull request #987 from lioncash/vec
vector_math: Use variable template version of is_signed in Vec classes
This commit is contained in:
commit
5b1b758326
1 changed files with 3 additions and 3 deletions
|
@ -78,7 +78,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename U = T>
|
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};
|
return {-x, -y};
|
||||||
}
|
}
|
||||||
constexpr Vec2<decltype(T{} * T{})> operator*(const Vec2& other) const {
|
constexpr Vec2<decltype(T{} * T{})> operator*(const Vec2& other) const {
|
||||||
|
@ -227,7 +227,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename U = T>
|
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};
|
return {-x, -y, -z};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,7 +436,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename U = T>
|
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};
|
return {-x, -y, -z, -w};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue