diff options
| author | Andrew Guschin <saintruler@gmail.com> | 2020-11-28 18:14:58 +0400 |
|---|---|---|
| committer | Andrew Guschin <saintruler@gmail.com> | 2020-11-28 18:14:58 +0400 |
| commit | 7be113983ed5e8a499ece4bcdf8463c33c9a7b1b (patch) | |
| tree | 201d74bcb0b426586ad0441101b3e92e91e0501b /task05_3D/Guschin/Matrix.h | |
| parent | d5defd81ab822f677678325883bf2f40a890b10c (diff) | |
Починил Matrix.h в Задаче 5 3D и допилил её
Diffstat (limited to 'task05_3D/Guschin/Matrix.h')
| -rw-r--r-- | task05_3D/Guschin/Matrix.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/task05_3D/Guschin/Matrix.h b/task05_3D/Guschin/Matrix.h index a47ee6e..e19a01f 100644 --- a/task05_3D/Guschin/Matrix.h +++ b/task05_3D/Guschin/Matrix.h @@ -64,7 +64,7 @@ public: { x *= v.x; y *= v.y; - a *= v.z; + z *= v.z; a *= v.a; return *this; } @@ -109,7 +109,7 @@ public: row1 = vec4(a, 0.f, 0.f, 0.f); row2 = vec4(0.f, a, 0.f, 0.f); row3 = vec4(0.f, 0.f, a, 0.f); - row3 = vec4(0.f, 0.f, 0.f, a); + row4 = vec4(0.f, 0.f, 0.f, a); } vec4& operator[](int i) @@ -129,7 +129,7 @@ public: const vec4 operator*(const vec4& v) { vec4* res = new(vec4); - for (int i = 0; i < 3; ++i) + for (int i = 0; i < 4; ++i) (*res)[i] = dot((*this)[i], v); return *res; } @@ -204,7 +204,6 @@ public: } }; - class mat2 { public: |