0

I have a problem with my application output. I looked for some related posts but I couldn't find anything.

I use a method that looks like this:

setPercent(score/max score * 100):

Where both score and max score are double. Whenever I set the score as 29 and the max score as 100, for some reason it outputs 28.99999996.

What I've tried: casting 100 as double, making score and max score as ints.

If you need any additional info. just let me know.

Thanks, zryw141

zryw141
  • 81
  • 6

0 Answers0