math_utils.hpp
Go to the documentation of this file.
1 #pragma once
2 
17 template <typename T> inline int sgn(T val) {
18  return (T(0) < val) - (val < T(0));
19 }
int sgn(T val)
Return the sign of the given value (-1, 0 or +1).
Definition: math_utils.hpp:17


cras_cpp_common
Author(s): Martin Pecka
autogenerated on Sat Jun 17 2023 02:32:53