Add a couple utility functions
Forgot to commit this new file in a previous commit
This commit is contained in:
parent
e55d40ab10
commit
9d0a41c0d2
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 New Issue
Block a user