net: tcp_client_socket connection state routines
[quarnos.git] / libs / math.h
blob77ce9ce31630895e24c68aa1f206ea69b849fdc3
1 #ifndef _MATH_H_
2 #define _MATH_H_
4 namespace math {
6 template<typename T>
7 static inline T min(T x, T y) {
8 return x < y ? x : y;
11 template<typename T>
12 static inline T max(T x, T y) {
13 return x > y ? x : y;
16 template<typename T>
17 static inline T abs(T x) {
18 return x > 0 ? x : -x;
23 #endif