From c1efdf9b0875f2a39488a86cd838947a24fab9fc Mon Sep 17 00:00:00 2001 From: quou Date: Tue, 2 May 2023 21:02:04 +1000 Subject: Initial commit. --- standard.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 standard.h (limited to 'standard.h') diff --git a/standard.h b/standard.h new file mode 100644 index 0000000..392425c --- /dev/null +++ b/standard.h @@ -0,0 +1,22 @@ +#ifndef standard_h +#define standard_h + +int string_equal(const char* a, const char* b); + +#define fbits 9 + +#define mini(a_, b_) ((a_) < (b_) ? (a_) : (b_)) +#define maxi(a_, b_) ((a_) > (b_) ? (a_) : (b_)) + +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); + +/* Not safe! */ +int f_to_buf(int f, char* buf); +int int_to_buf(int n, char* buf); + +#endif -- cgit v1.2.3-54-g00ecf