Skip to content
Snippets Groups Projects
Commit 135faf5b authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Fixed matrix inverse

parent ef93a426
Branches
Tags
No related merge requests found
......@@ -416,7 +416,8 @@ T cofactor(const TinyMatrix<N,T>& A,
const size_t& j)
{
static_assert(std::is_arithmetic<T>::value, "cofactor is not defined for non arithmetic types");
const T sign = ((i+j)%2) ? 1 : -1;
const T sign = ((i+j)%2) ? -1 : 1;
return sign * det(getMinor(A, i, j));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment