BAN: Implement abs()
This commit is contained in:
parent
36590fb5c7
commit
861bf27e96
|
@ -8,6 +8,12 @@
|
|||
namespace BAN::Math
|
||||
{
|
||||
|
||||
template<typename T>
|
||||
inline constexpr T abs(T val)
|
||||
{
|
||||
return val < 0 ? -val : val;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline constexpr T min(T a, T b)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue