netpong/includes/sign.hpp

9 lines
141 B
C++

#ifndef _MATH_HELP
#define _MATH_HELP
int signum(int num) {
int retval = 0;
(num > 0) ? retval = 1 : retval = -1;
return retval;
}
#endif