aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2024-05-11 01:05:19 +0200
committerkdx <kikoodx@paranoici.org>2024-05-11 01:05:54 +0200
commitbe9b445fd07d5ac3b711fbaa2035dc5091347a8d (patch)
treef60ac7fb534884f744eaae22307400ecd8736a3d
parentfd1583cda6cace861a3b28d2ddbb9590b76ee5c4 (diff)
downloadcminus-main.tar.gz
-rw-r--r--_.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/_.h b/_.h
index 36647fc..c18ee26 100644
--- a/_.h
+++ b/_.h
@@ -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