fsfw/globalfunctions/sign.h

9 lines
137 B
C
Raw Normal View History

#ifndef SIGN_H_
#define SIGN_H_
template <typename T> int sign(T val) {
return (T(0) < val) - (val < T(0));
}
#endif /* SIGN_H_ */