Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy to use vector/matrix/quaternion math library in pure C? [closed]

Tags:

c

math

opengl

I realize that there are several c++ libraries, but I would greatly prefer C. I found this, but it appears to be for Mac only: https://github.com/rsebbe/CeedMath

like image 806
Blub Avatar asked Sep 30 '12 07:09

Blub


2 Answers

(Shameless self advertisement) You may be interested in my linmath.h. Be warned though that I update it only occassionally and some parts may still contain weird bugs. Please report anything you may find.

like image 153
datenwolf Avatar answered Nov 10 '22 01:11

datenwolf


You should take a look at gsl for your math operations, and gmp for arbitrary precision numbers. They are both cross platform, gnu c libraries that are highly optimized for speed and have support for many types of operations.

Cheers, Ned

like image 22
Ned Bingham Avatar answered Nov 10 '22 00:11

Ned Bingham