add max/min

This commit is contained in:
Matthew 2025-09-05 08:54:58 +10:00
parent 4193fcb473
commit 86f94df063

12
math.d
View File

@ -14,6 +14,18 @@ import std.meta;
import std.format; import std.format;
import std.stdio; import std.stdio;
T
Max(T)(T a, T b)
{
return a > b ? a : b;
}
T
Min(T)(T a, T b)
{
return a < b ? a : b;
}
T T
RoundUp(T)(T a, T b) RoundUp(T)(T a, T b)
{ {