summaryrefslogtreecommitdiff
path: root/task05_3D/Guschin/Matrix.h
diff options
context:
space:
mode:
Diffstat (limited to 'task05_3D/Guschin/Matrix.h')
-rw-r--r--task05_3D/Guschin/Matrix.h7
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: