Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Just guessing as I don't have a compiler handy, but perhaps you have to cast the ints as floats.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
If both arguments are ints then integer math is used. Change one to a float or double and try again, or force one to be promoted to float with a cast like this:

x = NUMERATOR / (float) DENOMINATOR ;