top | item 39536076

(no title)

mmcnickle | 2 years 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.

discuss

order

Izkata|2 years ago

As the article mentions, this is called truncation. It truncates (cuts off) the value at the decimal point.