G
Guest
I write below code in my program:
float f=0.371f;
int i=(int)(f*1000.0f);
I think the result of "i" should be "371",but in fact it is "370",why?How to solve it?
float f=0.371f;
int i=(int)(f*1000.0f);
I think the result of "i" should be "371",but in fact it is "370",why?How to solve it?