Y
Hacker News
new
|
ask
|
show
|
jobs
by
mmcnickle
1012 days ago
The same reason int(-1.999) is -1; The operation is different to integer division. I think of it as taking the "integer" part of the float.
1 comments
Izkata
1011 days ago
As the article mentions, this is called truncation. It truncates (cuts off) the value at the decimal point.
link