merged cleanup
This commit is contained in:
@ -1,12 +1,19 @@
|
||||
#ifndef __MATH_INCLUDE_H_
|
||||
#define __MATH_INCLUDE_H_
|
||||
#ifndef MATH_INCLUDE_H_
|
||||
#define MATH_INCLUDE_H_
|
||||
|
||||
namespace bse {
|
||||
|
||||
// I didn't add any numeric constraints, will do with c++20
|
||||
|
||||
template<typename T>
|
||||
T& min(const T& a, const T& b) { return a < b ? a : b; }
|
||||
|
||||
template<typename T>
|
||||
T& max(const T& a, const T& b) { return a > b ? a : b; }
|
||||
|
||||
template<typename T>
|
||||
std::make_unsigned<T> abs(const T& a) { return a < 0 ? -a : a; }
|
||||
|
||||
} // namespace bse
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user