Go to the source code of this file.
Functions | |
template<class Scalar > | |
int | Ewoms::signum (Scalar val) |
Template function which returns the sign of a floating point value. More... | |
int Ewoms::signum | ( | Scalar | val | ) |
Template function which returns the sign of a floating point value.
This is a type safe and fast implementation of a sign() function for arbitrary floating point values. It a slightly modified variant of
https://stackoverflow.com/questions/1903954/is-there-a-standard-sign-function-signum-sgn-in-c-c