aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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