removed operator since its not even

This commit is contained in:
2024-09-03 22:21:42 +03:00
parent 7bb8dcbb8c
commit bc340b0d24
3 changed files with 1 additions and 27 deletions

View File

@@ -65,8 +65,6 @@ namespace omath
Matrix operator*(float f) const;
Matrix operator*(const Vector3 &vec3) const;
Matrix &operator*=(float f);
Matrix &operator/=(float f);

View File

@@ -165,19 +165,6 @@ namespace omath
Set(0.f);
}
Matrix Matrix::operator*(const Vector3 &vec3) const
{
auto vecmatrix = Matrix(m_rows, 1);
vecmatrix.Set(1.f);
vecmatrix.At(0, 0) = vec3.x;
vecmatrix.At(1, 0) = vec3.y;
vecmatrix.At(2, 0) = vec3.z;
return *this * vecmatrix;
}
Matrix &Matrix::operator=(const Matrix &other)
{
if (this == &other)

View File

@@ -66,17 +66,6 @@ TEST_F(UnitTestMatrix, Operator_Multiplication_Matrix)
EXPECT_FLOAT_EQ(m3.At(1, 1), 22.0f);
}
TEST_F(UnitTestMatrix, Operator_Multiplication_Vector3)
{
Vector3 v(1.0f, 2.0f, 3.0f);
Matrix m3(3, 3, new float[9]{1, 0, 0, 0, 1, 0, 0, 0, 1});
Matrix result = m3 * v;
EXPECT_FLOAT_EQ(result.At(0, 0), 1.0f);
EXPECT_FLOAT_EQ(result.At(1, 0), 2.0f);
EXPECT_FLOAT_EQ(result.At(2, 0), 3.0f);
}
TEST_F(UnitTestMatrix, Operator_Multiplication_Scalar)
{
Matrix m3 = m2 * 2.0f;