integer part of a number
int expression
Returns an integer part of the expression (a number rounded towards zero).
Example:
print int 2.1
print int 2.5
print int 2.9
print int -2.1
print int -2.5
print int -2.9
Output:
2
2
2
-2
-2
-2
See also:
Table of Content