2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _RSTL_MATH
|
|
|
|
#define _RSTL_MATH
|
2022-09-13 04:26:54 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
namespace rstl {
|
|
|
|
template < typename T >
|
2022-09-30 11:49:03 +00:00
|
|
|
inline const T& min_val(const T& a, const T& b) {
|
|
|
|
return (b < a) ? b : a;
|
2022-09-13 04:26:54 +00:00
|
|
|
}
|
2022-09-30 11:49:03 +00:00
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
template < typename T >
|
2022-09-30 11:49:03 +00:00
|
|
|
inline const T& max_val(const T& a, const T& b) {
|
|
|
|
return (a < b) ? b : a;
|
2022-09-13 04:26:54 +00:00
|
|
|
}
|
|
|
|
} // namespace rstl
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _RSTL_MATH
|