Skip to content

Brahvim/Simple-Math-Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Math-Library

A "simple" math library for rendering operations - "simple" for cross-platform speed.
Vectors, matrices, and quaternions. For now.
It has many functions, but I'll definitely be adding MANY more. Check include/library/sml.h.

Lots of union-abuse to support syntax like GLSL's "swizzles".
Code is as simple as possible for API granularity reasons as well as "general" platform-specific optimization reasons (may or may not use platform-specific SIMD intrinsics till I have the time to).
For now, I really do rely on "simple code" and compiler auto-vectorization.

All functions take memory addresses to the data structure[s] to perform an operation on, and a destination. Lots of const-correctness on those. Hopefully the compiler optimizes those, but I cannot give guarantees.

Should also provide batch-operation functions!... I do not have those right now!!!
Library does not handle allocation - might offer allocation pools some day, use IDs instead of pointers, maybe have more speed that way. That day iiis... not today!

About

WARNING! Too much `union`-abuse AND lots of plain formula errors!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published