add min/max to Math.h
This commit is contained in:
12
c_os/user/lib/Math.h
Normal file
12
c_os/user/lib/Math.h
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#ifndef __MATH_INCLUDE_H_
|
||||||
|
#define __MATH_INCLUDE_H_
|
||||||
|
|
||||||
|
namespace bse {
|
||||||
|
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; }
|
||||||
|
} // namespace bse
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user