aboutsummaryrefslogtreecommitdiff
path: root/src/utils/math.h
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2026-09-17 21:50:34 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2026-09-17 21:50:34 +0200
commit1f7e8e937d0e71e7eb3b5deab38b34d0a0159d88 (patch)
tree3eddf00f6f44356596b688325d4ef197c0e673e0 /src/utils/math.h
parentaa306fa0a2047f30d585da7923f963e8d321aa0b (diff)
downloadnissy-core-1f7e8e937d0e71e7eb3b5deab38b34d0a0159d88.tar.gz
nissy-core-1f7e8e937d0e71e7eb3b5deab38b34d0a0159d88.zip
Added include guardsHEADmasterinclude-guards
Diffstat (limited to '')
-rw-r--r--src/utils/math.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/math.h b/src/utils/math.h
index 0c56861..66ddaed 100644
--- a/src/utils/math.h
+++ b/src/utils/math.h
@@ -1,3 +1,6 @@
1#ifndef UTILS_MATH_H
2#define UTILS_MATH_H
3
1#define SWAP(x, y) do { x ^= y; y ^= x; x ^= y; } while (0) 4#define SWAP(x, y) do { x ^= y; y ^= x; x ^= y; } while (0)
2#define MIN(x, y) ((x) < (y) ? (x) : (y)) 5#define MIN(x, y) ((x) < (y) ? (x) : (y))
3#define MAX(x, y) ((x) > (y) ? (x) : (y)) 6#define MAX(x, y) ((x) > (y) ? (x) : (y))
@@ -146,3 +149,5 @@ intpow(double b, uint64_t e)
146 149
147 return e % 2 == 0 ? r * r : b * r * r; 150 return e % 2 == 0 ? r * r : b * r * r;
148} 151}
152
153#endif /* UTILS_MATH_H */

Generated with cgit - Back to sebastiano.tronto.net