diff options
author | kdx <kikoodx@paranoici.org> | 2024-05-11 01:05:19 +0200 |
---|---|---|
committer | kdx <kikoodx@paranoici.org> | 2024-05-11 01:05:54 +0200 |
commit | be9b445fd07d5ac3b711fbaa2035dc5091347a8d (patch) | |
tree | f60ac7fb534884f744eaae22307400ecd8736a3d | |
parent | fd1583cda6cace861a3b28d2ddbb9590b76ee5c4 (diff) | |
download | cminus-main.tar.gz |
-rw-r--r-- | _.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -68,6 +68,10 @@ void *_realloc(void *ptr, size_t size); const auto __s_ = (S); \ (__x_ > __y_) ? max(__x_ - __s_, __y_) : min(__x_ + __s_, __y_); \ }) +#define sign(X) ({ \ + const auto ___x_ = (X); \ + (___x_ > 0) - (___x_ < 0); \ +}) #ifndef PI # define PI 3.14159265358979323846 #endif |