|
|
|
|
|
by consp
847 days ago
|
|
because it's a float and not an int, it's strictly talking about integers here, not floats. All int conversions of floats are converted by discarding the remainder afaik but I could be wrong here (e.g. int(1.9) == 1, and int(-1.9) == -1) edit: -3//2 == -2 for instance, since it's strictly integer division |
|
Basically, there's no free lunch. Personally, I prefer truncating integer division in combination with a pair of remainder operators.