Added math helper function
This commit is contained in:
6
math-helpers.hpp
Normal file
6
math-helpers.hpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
int signum(int num) {
|
||||||
|
int retval = 0;
|
||||||
|
(num > 0) ? retval = 1 : retval = -1;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
Reference in New Issue
Block a user