From 7be113983ed5e8a499ece4bcdf8463c33c9a7b1b Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Sat, 28 Nov 2020 18:14:58 +0400 Subject: =?UTF-8?q?=D0=9F=D0=BE=D1=87=D0=B8=D0=BD=D0=B8=D0=BB=20Matrix.h?= =?UTF-8?q?=20=D0=B2=20=D0=97=D0=B0=D0=B4=D0=B0=D1=87=D0=B5=205=203D=20?= =?UTF-8?q?=D0=B8=20=D0=B4=D0=BE=D0=BF=D0=B8=D0=BB=D0=B8=D0=BB=20=D0=B5?= =?UTF-8?q?=D1=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- task05_3D/Guschin/Matrix.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'task05_3D/Guschin/Matrix.h') 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: -- cgit v1.2.3