diff --git a/include/omath/linear_algebra/mat.hpp b/include/omath/linear_algebra/mat.hpp index 75c4848..18b7d71 100644 --- a/include/omath/linear_algebra/mat.hpp +++ b/include/omath/linear_algebra/mat.hpp @@ -586,6 +586,17 @@ namespace omath {0, 0, 0, 1}, }; } + template + [[nodiscard]] + constexpr Mat<4, 4, Type, St> mat_scale(const Vector3& scale) noexcept + { + return { + {scale.x, 0, 0, 0}, + {0, scale.y, 0, 0}, + {0, 0, scale.z, 0}, + {0, 0, 0, 1}, + }; + } template [[nodiscard]]