summaryrefslogtreecommitdiff
path: root/math.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-28 15:44:12 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-28 15:44:12 -0500
commit52ac1f9d10d8752aa99698c0ee80c4f9420de389 (patch)
treede065be640d2fa08daebd4b4e95a81cef9770e08 /math.c
parent69b3c67d49aea37fb42493db2439670eac138a91 (diff)
cleaned up code a bit, started selection
Diffstat (limited to 'math.c')
-rw-r--r--math.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/math.c b/math.c
index 9ce919c..cd121d0 100644
--- a/math.c
+++ b/math.c
@@ -66,6 +66,14 @@ static float maxf(float a, float b) {
return a > b ? a : b;
}
+static u32 minu32(u32 a, u32 b) {
+ return a < b ? a : b;
+}
+
+static u32 maxu32(u32 a, u32 b) {
+ return a > b ? a : b;
+}
+
static float sgnf(float x) {
if (x < 0) return -1;
if (x > 0) return +1;