I need a simple floating point rounding function, thus:
double round(double); round(0.1) = 0 round(-0.1) = 0 round(-0.9) = -1
I can find
Since C++ 11 simply:
#include std::round(1.1)
or to get int
static_cast(std::round(1.1))