Hi,
I'm trying to round a number in a C++ program to the tenthousandths place. Here's what I have, but it only rounds to the thousandth place then stops:
float Roundtenthousandth( float tenthousandth )
{
return static_cast<float>(floor( tenthousandth * 10000 + 0.5 ) / 10000 );
}
Thanks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.