Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
Add a couple utility functions
Forgot to commit this new file in a previous commit
src/util.zig | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/util.zig b/src/util.zig
new file mode 100644
index 0000000..517e111
--- /dev/null
+++ b/src/util.zig
@@ -0,0 +1,7 @@
+pub fn max(comptime T: type, a: T, b: T) T {
+ return if (a > b) a else b;
+}
+
+pub fn min(comptime T: type, a: T, b: T) T {
+ return if (a < b) a else b;
+}