diff options
author | quou <quou@disroot.org> | 2024-06-30 18:24:01 +1000 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-06-30 18:27:11 +1000 |
commit | 39100e7292d3ee12d387fddfa0f0d7b712e31e1c (patch) | |
tree | 28f26b19de857868aeb9ecf23a7fecfc170addf9 /maths.h |
initial commit.
Diffstat (limited to 'maths.h')
-rw-r--r-- | maths.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#ifndef maths_h +#define maths_h + +#define mini(a_, b_) ((a_) < (b_) ? (a_) : (b_)) +#define maxi(a_, b_) ((a_) > (b_) ? (a_) : (b_)) +#define clamp(v_, min_, max_) (maxi(min_, mini(max_, v_))) + +#define fbits 9 + +int absolute(int x); +int fsin(int t); +int fcos(int t); +int ftan(int t); +int flerp(int a, int b, int t); +int fsqrt(int v); + +#endif |