cher-nov / linmath.h

A lean C99 library for linear math, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# linmath.h -- A small library for linear math as required for computer graphics

linmath.h provides the most used types required programming computer graphice:

vec3 -- 3 element vector of floats
vec4 -- 4 element vector of floats (4th component used for homogenous computations)
mat4x4 -- 4 by 4 elements matrix
quat -- quaternion

Note that computations with matrices are done in column major order by default.
Define LINMATH_H_ROW_MAJOR before inclusion of the library to use row major order.

The types are deliberately named like the types in GLSL. In fact they are meant to
be used for the client side computations and passing to same typed GLSL uniforms.

About

A lean C99 library for linear math, aimed at graphics programming. Supports vec3, vec4, mat4x4 and quaternions.

License:Do What The F*ck You Want To Public License


Languages

Language:C 100.0%