summaryrefslogtreecommitdiff
path: root/src/common/vector_math.h
diff options
context:
space:
mode:
authorGravatar Lioncash2018-04-19 22:58:19 -0400
committerGravatar Lioncash2018-04-19 22:58:24 -0400
commit956e200f126b4deb1b10d4433911c97b6c6fc77b (patch)
treed15f8e9b9c8ac1937578d89bf7339c40ada85f13 /src/common/vector_math.h
parentMerge pull request #355 from Subv/shader_instr (diff)
downloadyuzu-956e200f126b4deb1b10d4433911c97b6c6fc77b.tar.gz
yuzu-956e200f126b4deb1b10d4433911c97b6c6fc77b.tar.xz
yuzu-956e200f126b4deb1b10d4433911c97b6c6fc77b.zip
vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
These are all unused and the Write() ones should arguably not even be in the interface. There are better ways to provide this if we ever need it (like iterators).
Diffstat (limited to 'src/common/vector_math.h')
-rw-r--r--src/common/vector_math.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/common/vector_math.h b/src/common/vector_math.h
index 3f0057d9e..3f15ac1f4 100644
--- a/src/common/vector_math.h
+++ b/src/common/vector_math.h
@@ -55,10 +55,6 @@ public:
55 T x; 55 T x;
56 T y; 56 T y;
57 57
58 T* AsArray() {
59 return &x;
60 }
61
62 Vec2() = default; 58 Vec2() = default;
63 Vec2(const T& _x, const T& _y) : x(_x), y(_y) {} 59 Vec2(const T& _x, const T& _y) : x(_x), y(_y) {}
64 60
@@ -71,11 +67,6 @@ public:
71 return Vec2<T>(f, f); 67 return Vec2<T>(f, f);
72 } 68 }
73 69
74 void Write(T a[2]) {
75 a[0] = x;
76 a[1] = y;
77 }
78
79 Vec2<decltype(T{} + T{})> operator+(const Vec2& other) const { 70 Vec2<decltype(T{} + T{})> operator+(const Vec2& other) const {
80 return MakeVec(x + other.x, y + other.y); 71 return MakeVec(x + other.x, y + other.y);
81 } 72 }
@@ -205,10 +196,6 @@ public:
205 T y; 196 T y;
206 T z; 197 T z;
207 198
208 T* AsArray() {
209 return &x;
210 }
211
212 Vec3() = default; 199 Vec3() = default;
213 Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {} 200 Vec3(const T& _x, const T& _y, const T& _z) : x(_x), y(_y), z(_z) {}
214 201
@@ -225,12 +212,6 @@ public:
225 return MakeVec(f, f, f); 212 return MakeVec(f, f, f);
226 } 213 }
227 214
228 void Write(T a[3]) {
229 a[0] = x;
230 a[1] = y;
231 a[2] = z;
232 }
233
234 Vec3<decltype(T{} + T{})> operator+(const Vec3& other) const { 215 Vec3<decltype(T{} + T{})> operator+(const Vec3& other) const {
235 return MakeVec(x + other.x, y + other.y, z + other.z); 216 return MakeVec(x + other.x, y + other.y, z + other.z);
236 } 217 }
@@ -416,10 +397,6 @@ public:
416 T z; 397 T z;
417 T w; 398 T w;
418 399
419 T* AsArray() {
420 return &x;
421 }
422
423 Vec4() = default; 400 Vec4() = default;
424 Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {} 401 Vec4(const T& _x, const T& _y, const T& _z, const T& _w) : x(_x), y(_y), z(_z), w(_w) {}
425 402
@@ -436,13 +413,6 @@ public:
436 return Vec4<T>(f, f, f, f); 413 return Vec4<T>(f, f, f, f);
437 } 414 }
438 415
439 void Write(T a[4]) {
440 a[0] = x;
441 a[1] = y;
442 a[2] = z;
443 a[3] = w;
444 }
445
446 Vec4<decltype(T{} + T{})> operator+(const Vec4& other) const { 416 Vec4<decltype(T{} + T{})> operator+(const Vec4& other) const {
447 return MakeVec(x + other.x, y + other.y, z + other.z, w + other.w); 417 return MakeVec(x + other.x, y + other.y, z + other.z, w + other.w);
448 } 418 }