summaryrefslogtreecommitdiffstats
path: root/src/common/vector_math.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-01-30 01:52:38 +0100
committerGitHub <noreply@github.com>2023-01-30 01:52:38 +0100
commit5f4647df7da58aa22be21dd26cfa6de7c5f106c9 (patch)
tree4bbcaee76bde35ddc6eff9a1c639866cf278b353 /src/common/vector_math.h
parentMerge pull request #9699 from ameerj/texture-pass-desc (diff)
parentMove to Clang Format 15 (diff)
downloadyuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.gz
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.bz2
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.lz
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.xz
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.zst
yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.zip
Diffstat (limited to '')
-rw-r--r--src/common/vector_math.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index e62eeea2e..0e2095c45 100644
--- a/src/common/vector_math.h
+++ b/src/common/vector_math.h
@@ -348,9 +348,7 @@ public:
// _DEFINE_SWIZZLER2 defines a single such function, DEFINE_SWIZZLER2 defines all of them for all
// component names (x<->r) and permutations (xy<->yx)
#define _DEFINE_SWIZZLER2(a, b, name) \
- [[nodiscard]] constexpr Vec2<T> name() const { \
- return Vec2<T>(a, b); \
- }
+ [[nodiscard]] constexpr Vec2<T> name() const { return Vec2<T>(a, b); }
#define DEFINE_SWIZZLER2(a, b, a2, b2, a3, b3, a4, b4) \
_DEFINE_SWIZZLER2(a, b, a##b); \
_DEFINE_SWIZZLER2(a, b, a2##b2); \
@@ -543,9 +541,7 @@ public:
// DEFINE_SWIZZLER2_COMP2 defines two component functions for all component names (x<->r) and
// permutations (xy<->yx)
#define _DEFINE_SWIZZLER2(a, b, name) \
- [[nodiscard]] constexpr Vec2<T> name() const { \
- return Vec2<T>(a, b); \
- }
+ [[nodiscard]] constexpr Vec2<T> name() const { return Vec2<T>(a, b); }
#define DEFINE_SWIZZLER2_COMP1(a, a2) \
_DEFINE_SWIZZLER2(a, a, a##a); \
_DEFINE_SWIZZLER2(a, a, a2##a2)
@@ -570,9 +566,7 @@ public:
#undef _DEFINE_SWIZZLER2
#define _DEFINE_SWIZZLER3(a, b, c, name) \
- [[nodiscard]] constexpr Vec3<T> name() const { \
- return Vec3<T>(a, b, c); \
- }
+ [[nodiscard]] constexpr Vec3<T> name() const { return Vec3<T>(a, b, c); }
#define DEFINE_SWIZZLER3_COMP1(a, a2) \
_DEFINE_SWIZZLER3(a, a, a, a##a##a); \
_DEFINE_SWIZZLER3(a, a, a, a2##a2##a2)
@@ -641,8 +635,8 @@ template <typename T>
// linear interpolation via float: 0.0=begin, 1.0=end
template <typename X>
-[[nodiscard]] constexpr decltype(X{} * float{} + X{} * float{})
- Lerp(const X& begin, const X& end, const float t) {
+[[nodiscard]] constexpr decltype(X{} * float{} + X{} * float{}) Lerp(const X& begin, const X& end,
+ const float t) {
return begin * (1.f - t) + end * t;
}