Linear algebra functions and utilities for 3D rendering in C

izzy a2d0b8b780 more rectangle functions 4 days ago
algorithms 558af45f6c 2d line rasterization algorithms designed for searching spatial hashes 2 weeks ago
intersect a2d0b8b780 more rectangle functions 4 days ago
optimizations 5d318b7e08 beginning migration to version 2 4 years ago
.gitignore 8827e68c4b tri/plane clipping 4 years ago
LICENSE fe493e9cf8 point-polygon distance function 2 years ago
README.md 7393055bee Matrix-vector multiplication that preserves /what you want/ when transforming world coordinates into clip space for culling purposes 2 years ago
build.sh fe9395c9bd Mostly finished migration to version 2, filled in many missing functions 4 years ago
c3dlas.c c00540838c 2d triangle point and line functions 2 weeks ago
c3dlas.h a2d0b8b780 more rectangle functions 4 days ago
generic_vectors.h 88eaf75163 vDiv, fixes for matrix and quaternion fns 2 months ago
inertia.c 9475019198 Inertial moment functions 1 year ago
inertia.h 9475019198 Inertial moment functions 1 year ago
legacy_migration.sh 5d318b7e08 beginning migration to version 2 4 years ago
line.c a2d0b8b780 more rectangle functions 4 days ago
matrix3.c 5b8cd715ba missing semicolon and some other fixes 1 year ago
matrix4.c 17796af1d4 fixed #if 1 month ago
meshgen.c 7393055bee Matrix-vector multiplication that preserves /what you want/ when transforming world coordinates into clip space for culling purposes 2 years ago
meshgen.h 7393055bee Matrix-vector multiplication that preserves /what you want/ when transforming world coordinates into clip space for culling purposes 2 years ago
quaternion.c 81a45094c1 new ine/rectangle functions, reorganization of line functions 2 weeks ago
short_macros.h e53f9c0dfb make the vector short macro initializers eat trailing commas 7 months ago
test.c 5d318b7e08 beginning migration to version 2 4 years ago

README.md

c3dlas

Linear algebra functions and utilities for 3D rendering in C

This library exists because I couldn't find an MIT/BSD licensed C library for doing the math required in a OpenGL program. It's not optimized, extensive, or sophisticated. It is free and written in pure C.

C++ has become fat and ugly with age. Not that it was a 9 to start with...

ATLAS/CBLAS are an incomprehensible mess.

GPL, while a wonderful thing, is a bit heavy-handed for some basic math functions.

I firmly believe that such a library did not exist because most of the functionality was built in to older OpenGL versions. By the time OpenGL 3.3 came out most developers had converted to worshiping under the altar of OOP.

There are probably math bugs somewhere. If you find one, report it on github. Preferably include how to fix it to make my life easier.