mirror of
https://github.com/hyprwm/hyprutils.git
synced 2026-06-21 23:08:23 +02:00
math: minor improvement to Mat3x3.translate
This commit is contained in:
parent
3cd3972b2e
commit
d16d145ced
1 changed files with 2 additions and 1 deletions
|
|
@ -109,7 +109,8 @@ Mat3x3& Mat3x3::scale(const float scale_) {
|
|||
}
|
||||
|
||||
Mat3x3& Mat3x3::translate(const Vector2D& offset) {
|
||||
multiply(std::array<float, 9>{1.0f, 0.0f, sc<float>(offset.x), 0.0f, 1.0f, sc<float>(offset.y), 0.0f, 0.0f, 1.0f});
|
||||
matrix[2] += offset.x;
|
||||
matrix[5] += offset.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue