I've been trying to round a float value to 4 precision without success.
float fconv = 1.0f;
float fdata = 39.934543423412f;
float fres = RoundTo(fdata*fconv, -4);
if(fres <= 39.9345f){do something;} //<-- unwanted behavior
Wanted result is 39.934500000000
Actual result is 39.934543423412
I've tried many methods including Round a float to a given precision without success.
I'm working on an AMD FX83xx 64bit. Program is built in 32bit Debug using XE7
Thanks