fixed infinite recursion in compile time

This commit is contained in:
2025-04-29 20:08:27 +03:00
parent 69b9049fb0
commit 4ef674f7b4

View File

@@ -253,7 +253,8 @@ namespace omath
if constexpr (Rows == 2)
return At(0, 0) * At(1, 1) - At(0, 1) * At(1, 0);
else
if constexpr (Rows > 2)
{
Type det = 0;
for (size_t i = 0; i < Columns; ++i)
@@ -263,11 +264,13 @@ namespace omath
}
return det;
}
std::unreachable();
}
[[nodiscard]]
constexpr Mat<Rows - 1, Columns - 1, Type, StoreType> Minor(const size_t row, const size_t column) const
{
static_assert(Rows-1 > 0 && Columns-1 > 0);
Mat<Rows - 1, Columns - 1, Type, StoreType> result;
for (size_t i = 0, m = 0; i < Rows; ++i)
{