240 / 10 = 23,9999

just divide 2 integers instead of float and the result should also be an integer.

In your case:

when your “Round (or Cast to Int)” to int. Do a int / int division instead of float / float