+ 1

where did the 1.25 come from. i understand the floor division. the remainder should be 2. what does 1.25 have to do with anything?

13th Sep 2016, 6:04 PM
Jesse Christianson
Jesse Christianson - avatar
3 Respostas
+ 2
1.25 = 0.5 +0.5 + 0.25 So, when 1.25 / 0.5 the integer part is 2 and the remains is 0.25
14th Sep 2016, 1:30 AM
looyea
+ 1
1.25 % 0.5 is a completely separate operation. Also, 20 % 6 is indeed 2.
13th Sep 2016, 6:11 PM
Zen
Zen - avatar
+ 1
thank you!
13th Sep 2016, 6:13 PM
Jesse Christianson
Jesse Christianson - avatar