Add a couple utility functions

Forgot to commit this new file in a previous commit
This commit is contained in:
Isaac Freund 2020-03-29 14:08:39 +02:00
parent e55d40ab10
commit 9d0a41c0d2
No known key found for this signature in database
GPG Key ID: 86DED400DDFD7A11

7
src/util.zig Normal file
View File

@ -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;
}