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 }
sgn
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 Mon Jun 17 2024 02:48:56