summaryrefslogtreecommitdiffstats
path: root/src/common/vector_math.h
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-08 03:33:48 +0200
committerLioncash <mathew1800@gmail.com>2018-08-08 03:33:48 +0200
commit766c1a2d501966d4e6944cd16b9cee9f35db7a89 (patch)
tree30338cf69d6b024fb2562406994c70e364f7c542 /src/common/vector_math.h
parentvector_math: Make functions constexpr where applicable (diff)
downloadyuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar.gz
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar.bz2
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar.lz
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar.xz
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.tar.zst
yuzu-766c1a2d501966d4e6944cd16b9cee9f35db7a89.zip
Diffstat (limited to '')
-rw-r--r--src/common/vector_math.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index 7e5af651a..5c94fcda3 100644
--- a/src/common/vector_math.h
+++ b/src/common/vector_math.h
@@ -113,10 +113,6 @@ public:
// Only implemented for T=float
float Length() const;
- void SetLength(const float l);
- Vec2 WithLength(const float l) const;
- float Distance2To(Vec2& other);
- Vec2 Normalized() const;
float Normalize(); // returns the previous length, which is often useful
constexpr T& operator[](std::size_t i) {
@@ -204,10 +200,6 @@ public:
return Vec3<T2>(static_cast<T2>(x), static_cast<T2>(y), static_cast<T2>(z));
}
- // Only implemented for T=int and T=float
- static Vec3 FromRGB(unsigned int rgb);
- unsigned int ToRGB() const; // alpha bits set to zero
-
static constexpr Vec3 AssignToAll(const T& f) {
return Vec3(f, f, f);
}
@@ -270,9 +262,6 @@ public:
// Only implemented for T=float
float Length() const;
- void SetLength(const float l);
- Vec3 WithLength(const float l) const;
- float Distance2To(Vec3& other);
Vec3 Normalized() const;
float Normalize(); // returns the previous length, which is often useful
@@ -418,10 +407,6 @@ public:
static_cast<T2>(w));
}
- // Only implemented for T=int and T=float
- static Vec4 FromRGBA(unsigned int rgba);
- unsigned int ToRGBA() const;
-
static constexpr Vec4 AssignToAll(const T& f) {
return Vec4(f, f, f, f);
}
@@ -485,14 +470,6 @@ public:
return x * x + y * y + z * z + w * w;
}
- // Only implemented for T=float
- float Length() const;
- void SetLength(const float l);
- Vec4 WithLength(const float l) const;
- float Distance2To(Vec4& other);
- Vec4 Normalized() const;
- float Normalize(); // returns the previous length, which is often useful
-
constexpr T& operator[](std::size_t i) {
return *((&x) + i);
}