If a library doesn't provide all my needs, how should I proceed?

Posted by 9a3eedi on Programmers See other posts from Programmers or by 9a3eedi
Published on 2014-05-28T05:52:31Z Indexed on 2014/05/28 10:01 UTC
Read the original article Hit count: 284

I'm developing an application involving math and physics models, and I'd like to use a Math library for things like Matrices. I'm using C#, and so I was looking for some libraries and found Math.NET. I'm under the impression, from past experience, that for math, using a robust and industry-approved third party library is much better than writing your own code.

It seems good for many purposes, but it does not provide support for Quaternions, which I need to use as a type. Also, I need some functions in Vector and Matrix that also aren't provided, such as rotation matrices and vector rotation functions, and calculating cross products. At the same time, it provides a lot of functions/classes that I simply do not need, which might mean a lot of unnecessary bloat and complexity.

At this rate, should I even bother using the library? Should I write my own math library? Or is it a better idea to stick to the third party library and somehow wrap around it? Perhaps I should make a subclass of the Matrix and Vector type of the library? But isn't that considered bad style?

I've also tried looking for other libraries but unfortunately I couldn't find anything suitable.

© Programmers or respective owner

Related posts about c#

Related posts about libraries