tomstewart89 / BasicLinearAlgebra

A library for using matrices and linear algebra on Arduino
MIT License
187 stars 38 forks source link

Fixed bug in Determinant() #25

Closed grassjelly closed 5 years ago

grassjelly commented 5 years ago

This PR fixes the bug in Determinant() function for arbitrary matrix dimension. The current implementation prevents the first term's minor matrix to be multiplied by its determinant. I explicitly changed the signs of each term(alternating) just to be safe.

Here's the test code I was using: https://gist.github.com/grassjelly/7ac9221febd197413f9ebb27883b01e1#file-determinant-test

tomstewart89 commented 5 years ago

Sorry for the slow response, LGTM! Thanks for the PR!