add min to math module

This commit is contained in:
2025-10-20 14:48:27 +03:00
parent e019235297
commit b663bcfb8f
4 changed files with 13 additions and 4 deletions

View File

@@ -12,4 +12,10 @@ namespace hack::math
{
return a > b ? a : b;
}
template<typename T, typename U, typename RT = std::common_type_t<T, U>>
inline RT min(T a, U b)
{
return a < b ? a : b;
}
}

View File

@@ -13,7 +13,7 @@ headers = [
'hack/logger/logger.hpp',
'hack/math/max.hpp',
'hack/math/math.hpp',
'hack/range/sort.hpp',
'hack/range/save_to_file.hpp',