HandmadeMath / HandmadeMath

A simple math library for games and computer graphics. Compatible with both C and C++. Public domain and easy to modify.
Creative Commons Zero v1.0 Universal
1.18k stars 92 forks source link

Ship a set of basic math functions as an easy CRT alternative #128

Open bvisness opened 3 years ago

bvisness commented 3 years ago

While Handmade Math currently has the ability to compile without the CRT if you provide implementations for sin, cos, etc., it might be nice to provide an optional set of implementations that could be easily included for people who do not want the CRT.

nakst on HMN offered that we could use his math functions, which he released into the public domain under the unlicense: https://gist.github.com/nakst/f9c00ef6969fd6ad380bcbae2e10e64a

strangezakary commented 3 years ago

Ah I mean if he offered I am more than happy to implement these in Handmade Math. How we implement them is a bit of a different question. I.E: Do we always prefer these implementations or use the CRT ones by default.

Either way, I am totally okay with this.

nakst commented 3 years ago

I think it's best to prefer the CRT implementation if they exist, since they will likely be more optimised for the specific platform.