From 4f11d1e4fa4b6abf2ecb8b698a33c54f268c1e8f Mon Sep 17 00:00:00 2001 From: Leto Date: Mon, 23 Dec 2024 21:27:18 +0100 Subject: [PATCH] Sub to Substract --- matrices.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/matrices.h b/matrices.h index fba4ad9..285e9e4 100644 --- a/matrices.h +++ b/matrices.h @@ -13,13 +13,13 @@ class Matrix{ void Set(float); - void Factor(float); + void Multiply(float); void Add(float); void Add(Matrix*); - void Sub(float); - void Sub(Matrix*); + void Substract(float); + void Substract(Matrix*); void Print(std::string_view); @@ -54,7 +54,7 @@ void Matrix::Add(Matrix* other){ } // Substract 2 matrices -void Matrix::Sub(Matrix* other){ +void Matrix::Substract(Matrix* other){ // Matrices need to be the same size assertm(this->values.size() == other->values.size() && this->values[0].size() == other->values[0].size(), @@ -88,7 +88,7 @@ void Matrix::Add(float value){ } // Substract a constant value to every matrix case -void Matrix::Sub(float value){ +void Matrix::Substract(float value){ for(int m = 0; m < this->values.size(); m++){ for(int n = 0; n < this->values[m].size(); n++){ this->values[m][n] -= value; @@ -97,7 +97,7 @@ void Matrix::Sub(float value){ } // Multiply every matrix case by a given factor -void Matrix::Factor(float value){ +void Matrix::Multiply(float value){ for(int m = 0; m < this->values.size(); m++){ for(int n = 0; n < this->values[m].size(); n++){ this->values[m][n] *= value; @@ -107,7 +107,7 @@ void Matrix::Factor(float value){ // Set a matrix to a given value void Matrix::Set(float value){ - this->Factor(0.0F); + this->Multiply(0.0F); this->Add(value); }