river/src/util.zig
Isaac Freund 9d0a41c0d2
Add a couple utility functions
Forgot to commit this new file in a previous commit
2020-03-29 14:08:39 +02:00

8 lines
159 B
Zig

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