To my surprise, the int() is required.
Spotted by Mads when he reviewed D5063. Thanks!
pulkit |
hg-reviewers |
To my surprise, the int() is required.
Spotted by Mads when he reviewed D5063. Thanks!
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
def charnum(count):
- return int(round(count * width // maxcount))
+ return int(count * width // maxcount)
We're doing floating-point division as maxcount is float.