crertel / graphmath

An Elixir library for performing 2D and 3D mathematics.
The Unlicense
79 stars 14 forks source link

Matrix 3x3 and 4x4 inverses #6

Closed Host32 closed 9 years ago

Host32 commented 9 years ago

inverse(a) calculates the inverse matrix

a is a mat to be inverted

Returs a mat representing a-1

Raises an error when you try to calculate inverse of a matrix whose determinant is zero

crertel commented 9 years ago

Awesome!

Let me find out what the cost of exception throwing is in Elixir/Erlang...as I recall, I think most code doesn't really throw exceptions. So, let's see what's idiomatic, and then go from there.

Thank you again!

crertel commented 9 years ago

Merged this in and updated the hex package.

I'm fine with throwing an exception, because I think that's reasonable behavior. :)

I'll get us ready for anything left on our 1.0.0 release.

Thanks again!