From fd1ea8b41fd44839780e6b06af97804aae82ed07 Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 25 Nov 2023 14:18:59 -0800 Subject: [PATCH] Matrix2x2: added Scale method --- Common/interface/BasicMath.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Common/interface/BasicMath.hpp b/Common/interface/BasicMath.hpp index f82c7923d..d61a20d52 100644 --- a/Common/interface/BasicMath.hpp +++ b/Common/interface/BasicMath.hpp @@ -881,6 +881,13 @@ template struct Matrix2x2 0, 1}; } + constexpr static Matrix2x2 Scale(T x, T y) + { + return Matrix2x2{ + x, 0, + 0, y}; + } + constexpr static Matrix2x2 Mul(const Matrix2x2& m1, const Matrix2x2& m2) { Matrix2x2 mOut;