summaryrefslogtreecommitdiff
path: root/src/utils.h
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-02-11 22:50:21 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-02-11 22:50:21 +0100
commita0a68b7b3a5430fea5aaa2ad1da75fdda5cd5c7a (patch)
treef30c9d90ce0d864dc65cb1307a7196b80e63d71c /src/utils.h
parent64b0664a648ec4a6c424e932b605f09dc4ee6151 (diff)
packing corrections
Diffstat (limited to 'src/utils.h')
-rw-r--r--src/utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.h b/src/utils.h
index 10bdd88..00be767 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -74,6 +74,11 @@ static inline u32 wayc_min(u32 a, u32 b) { return a > b ? a : b; }
#define WAYC_FRAC_BITS 6
#define WAYC_SCALE (1 << WAYC_FRAC_BITS)
+#define WAYC_X(v) ((v)[0])
+#define WAYC_Y(v) ((v)[1])
+
+static inline usize wayc_max(usize a, usize b) { return a > b ? a : b; }
+
template <typename A, typename B>
struct is_same {
static constexpr bool value = false;