ID:1605966
 
My matrix library is now complete. http://www.byond.com/developer/Lugia319/Matrices

I put in a host of functions that would be expected in a matrix library with the exception of a determinant function. I need to think of an algorithm for that. And before you ask, no, there isn't an inverse function either because you kinda need to know the determinant to make sure an inverse even exists. I might add a "vectorize" function that'll take a column and turn it into a vector to be used. We'll see. For now, I hope to use it in my pathfinding algorithm.

Any bugs you find, please send to me. Any suggestions on expanding this to make it more useful for you, just let me know and I'll see if it warrants an update.
Correct me if i'm wrong (i haven't used matrices like in 3 years), but you don't really need the determinant to get the inverse (for example if a row its all zeros it just doesn't exist, using matrix conditions instead of the determinant), and if you really want the determinant, i think the Cramer's rule its the easier way to get the determinant (well at least on paper).

I don't remember that it was difficult to code the algorithm for those methods but i was using MATLAB so maybe that's why xD.

Edit: In the long run maybe its better to use the determinant if your adding more functions that use it
If the determinant is zero, an inverse does not exist.

When it comes to making the determinant, I'll probably wind up reducing it all into 2x2 matrices.