Yeah I noticed that std::setprecision(3) rounded me to 50 as well. I just don't want it to reduce by mb. 49,48,47 after reducing hdSpace. I'm really looking for 3 digits like 49.9,49.8,49.7
Sorry if the original question wasnt clear. I have a bad problem with that.
Thanks for the replys so far.
Miinipaa I haven't tried your code yet so I just woke up. Give me a second and I'll see if that's what I'm looking for.
You need C++11 for trunc. Compile with -std=c++11 or -std=c++0x Also just FYI: the previous rounding is working correctly because 50.0 is closer to 49.98 than 49.9.