Add a couple utility functions
Forgot to commit this new file in a previous commit
This commit is contained in:
parent
e55d40ab10
commit
9d0a41c0d2
1 changed files with 7 additions and 0 deletions
7
src/util.zig
Normal file
7
src/util.zig
Normal 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;
|
||||
}
|
Loading…
Reference in a new issue