summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-04-20 09:42:41 -0400
committerGravatar GitHub2018-04-20 09:42:41 -0400
commit79c1ed80e965a45db8114d39a54294cf730c98b9 (patch)
tree5fb5502b0892b8a6903eff3816da5d6d0879a1e1 /src
parentMerge pull request #365 from lioncash/codeblock (diff)
parentvector_math: Remove AsArray() and Write() functions from Vec[2,3,4] (diff)
downloadyuzu-79c1ed80e965a45db8114d39a54294cf730c98b9.tar.gz
yuzu-79c1ed80e965a45db8114d39a54294cf730c98b9.tar.xz
yuzu-79c1ed80e965a45db8114d39a54294cf730c98b9.zip
Merge pull request #366 from lioncash/vec
vector_math: Remove AsArray() and Write() functions from Vec[2,3,4]
Diffstat (limited to 'src')
-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 }