Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pr0g/as-c-math
https://github.com/pr0g/as-c-math
Last synced: 27 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pr0g/as-c-math
- Owner: pr0g
- License: mit
- Created: 2022-11-19T22:37:35.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-13T08:29:48.000Z (about 1 month ago)
- Last Synced: 2024-11-13T09:28:15.507Z (about 1 month ago)
- Language: C
- Size: 182 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# as-c-math
C linear algebra math library (initial version created during [pikuma-3d-graphics](https://github.com/pr0g/pikuma-3d-graphics)).
## Conventions/Storage
- **Convention**: Column vectors
- **Storage**: Row major`as-c-math` uses column vectors (matrices are multiplied right to left - post-multiply) with vectors appearing on the right of a matrix multiply. The storage order is row major however (basis axes are interleaved). Matrices must be transposed before being passed to any graphics API to ensure the basis vectors are contiguous in memory.
## as C++ library
- [as](https://github.com/pr0g/as) - C++ linear algebra math library (templated).
## Alternative linear algebra math libraries written in C
- [linmath.h](https://github.com/datenwolf/linmath.h)
- [Handmade-Math](https://github.com/HandmadeMath/Handmade-Math)
- [kazmath](https://github.com/Kazade/kazmath)## WIP
- ~~negate~~
- ~~near~~
- vec_min
- vec_max
- vec_min_elem
- vec_max_elem
- vec_abs
- vec_clamp
- vec_saturate
- vec_floor
- vec_ceil
- vec_round
- vec_orthogonal (cw/ccw)
- reflect
- orthogonal
- orthonormal_basis
- point/vec average
- ~~mat_determinant~~
- ~~mat_inverse~~
- mat shear
- ~~quaternion~~
- basis
- ~~add _v postfix for matrix functions to allow call by value~~