icarpenter
MIS
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:
Code:
float Roundtenthousandth( float tenthousandth )
{
return static_cast<float>(floor( tenthousandth * 10000 + 0.5 ) / 10000 );
}