I am trying to get a floating variable accurate to just 3 decimal points for a comparison calculation. I am trying the method below, but it doesn\'t work. I can\'t see why not,
bb is an int, so bb / 1000 will follow the integer division. Change either or both operand to a double. The simplest way is:
bb
int
bb / 1000
double
fbb = bb / 1000.0; //type of 1000.0 is double
or
fbb = (double)bb / 1000