mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 10:32:29 +00:00
feat(matrix): add C44Matrix::Scale for float
This commit is contained in:
parent
6b14afb6bd
commit
3dd32515fe
2 changed files with 15 additions and 0 deletions
|
|
@ -79,6 +79,20 @@ void C44Matrix::Scale(const C3Vector& scale) {
|
|||
this->c2 *= scale.z;
|
||||
}
|
||||
|
||||
void C44Matrix::Scale(float scale) {
|
||||
this->a0 *= scale;
|
||||
this->a1 *= scale;
|
||||
this->a2 *= scale;
|
||||
|
||||
this->b0 *= scale;
|
||||
this->b1 *= scale;
|
||||
this->b2 *= scale;
|
||||
|
||||
this->c0 *= scale;
|
||||
this->c1 *= scale;
|
||||
this->c2 *= scale;
|
||||
}
|
||||
|
||||
C44Matrix operator*(const C44Matrix& l, float a) {
|
||||
float a0 = l.a0 * a;
|
||||
float a1 = l.a1 * a;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ class C44Matrix {
|
|||
C44Matrix Inverse(float det) const;
|
||||
void RotateAroundZ(float angle);
|
||||
void Scale(const C3Vector& scale);
|
||||
void Scale(float scale);
|
||||
};
|
||||
|
||||
C44Matrix operator*(const C44Matrix& l, float a);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue