summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-23 18:57:41 -0500
committerpommicket <pommicket@gmail.com>2022-12-23 18:57:41 -0500
commiteb7519e92f768224803ab66985541c99bddc2bf0 (patch)
tree53a414205020cad9e8fcd2d8436e30cfae872a6e /math.c
parent431a785f20127a7f1b6c1a6f1cd2a5031a7236ca (diff)
scroll through completions
Diffstat (limited to 'math.c')
-rw-r--r--math.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/math.c b/math.c
index c7ac64b..80ef10e 100644
--- a/math.c
+++ b/math.c
@@ -147,6 +147,11 @@ static inline i64 mod_i64(i64 a, i64 b) {
if (ret < 0) ret += b;
return ret;
}
+static inline i32 mod_i32(i32 a, i32 b) {
+ i32 ret = a % b;
+ if (ret < 0) ret += b;
+ return ret;
+}
static inline i64 abs_i64(i64 x) {
return x < 0 ? -x : +x;