1
0
Fork 0

Math/Transform: rename multiply() to combine()

This commit is contained in:
Henrik Hautakoski 2020-02-12 19:27:41 +01:00
parent 1194128627
commit 76d175ffd9
No known key found for this signature in database
GPG key ID: 96765B12FEAC4745
2 changed files with 6 additions and 6 deletions

View file

@ -53,7 +53,7 @@ public :
Transform& scale(Vector2f offset); Transform& scale(Vector2f offset);
Transform& scale(float s); Transform& scale(float s);
Transform& multiply(const Transform& other); Transform& combine(const Transform& other);
Vector2f transformPoint(float x, float y) const; Vector2f transformPoint(float x, float y) const;

View file

@ -56,7 +56,7 @@ Transform& Transform::translate(float x, float y)
0, 1, y, 0, 1, y,
0, 0, 1); 0, 0, 1);
return multiply(t); return combine(t);
} }
Transform& Transform::translate(Vector2f vec) Transform& Transform::translate(Vector2f vec)
@ -75,7 +75,7 @@ Transform& Transform::rotate(float theta)
s, c, 0, s, c, 0,
0, 0, 1); 0, 0, 1);
return multiply(r); return combine(r);
} }
Transform& Transform::scale(float x, float y) Transform& Transform::scale(float x, float y)
@ -84,7 +84,7 @@ Transform& Transform::scale(float x, float y)
0, y, 0, 0, y, 0,
0, 0, 1); 0, 0, 1);
return multiply(s); return combine(s);
} }
Transform& Transform::scale(Vector2f vec) Transform& Transform::scale(Vector2f vec)
@ -97,7 +97,7 @@ Transform& Transform::scale(float s)
return scale(s, s); return scale(s, s);
} }
Transform& Transform::multiply(const Transform& other) Transform& Transform::combine(const Transform& other)
{ {
m_matrix *= other.m_matrix; m_matrix *= other.m_matrix;
return *this; return *this;
@ -152,7 +152,7 @@ Transform operator*(const Transform& a, const Transform& b)
Transform& operator*=(Transform& a, const Transform& other) Transform& operator*=(Transform& a, const Transform& other)
{ {
a.multiply(other); a.combine(other);
return a; return a;
} }