Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoyoengine/lilith
A crude linear algebra library, created for learning purposes and for use in yoyoengine.
https://github.com/yoyoengine/lilith
linear-algebra math matrix-multiplication
Last synced: about 1 month ago
JSON representation
A crude linear algebra library, created for learning purposes and for use in yoyoengine.
- Host: GitHub
- URL: https://github.com/yoyoengine/lilith
- Owner: yoyoengine
- License: mit
- Created: 2024-12-14T03:32:09.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2024-12-14T20:01:28.000Z (about 1 month ago)
- Last Synced: 2024-12-14T20:25:47.873Z (about 1 month ago)
- Topics: linear-algebra, math, matrix-multiplication
- Language: C
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Lilith Linear Algebra
A super simple linear algebra library created for use with [yoyoengine](https://github.com/yoyoengine).
No gaurantees are made for correctness or optimization, I rolled this myself for fun and to learn.
![Evangelion Reference](https://static.wikia.nocookie.net/evangelion/images/9/99/Lilith_with_Lance.png/revision/latest/thumbnail/width/360/height/360?cb=20120210032404)
## Features
- 3x3 matrix operations
- 2D vector operations## Example
```c
#includeint main() {
mat3_t identity = lla_mat3_identity();
mat3_t scale = lla_mat3_scale(identity, 2.0f);mat3_t test = lla_mat3(10.0f, 80.0f, 4.0f, 5.0f, 78.0f, 9.0f, 47.0f, 9.0f, 5.0f);
mat3_t result = lla_mat3_mult(scale, test);
const char* res_str = lla_mat3_string(result);
printf("%s\n", res_str);
free((void*)res_str);/*
Output:
[20.000000, 160.000000, 8.000000]
[10.000000, 156.000000, 18.000000]
[94.000000, 18.000000, 10.000000]
*/}
```## Todo
- vec3 and appropriate mult funcs?
- row/col extraction?
- unit tests?