Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python math.trunc

import math
print (math.trunc(2.5))  # 2 (behaves like math.floor)
print (math.trunc(-2.5))  # -2 (behaves like math.ceil)
 
PREVIOUS NEXT
Tagged: #python
ADD COMMENT
Topic
Name
9+9 =