經安全檢測,此網站為安全網站,請放心前往原始網址!

floating point - round() for float in C++ - Stack Overflow

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 ceil() and floor() in the math.h - but not round(). Is... ... It's available since C++11 in cmath (according to http:/

stackoverflow.com

網址安全性掃描由 google 提供