From 466d8f7becc9ad6e903c76dcec9fce7bf995eef0 Mon Sep 17 00:00:00 2001 From: Orange Date: Fri, 11 Apr 2025 23:20:16 +0300 Subject: [PATCH] improvement --- include/omath/mat.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/omath/mat.hpp b/include/omath/mat.hpp index d8cf403..78737d2 100644 --- a/include/omath/mat.hpp +++ b/include/omath/mat.hpp @@ -198,9 +198,7 @@ namespace omath constexpr Mat& operator/=(const Type& f) noexcept { - for (size_t i = 0; i < Rows; ++i) - for (size_t j = 0; j < Columns; ++j) - At(i, j) /= f; + std::ranges::for_each(m_data,[&f](auto& val) {val /= f;}); return *this; }