Handy if you’re using python to lookup a value and it returns a rounding error.
example:
mychop[0] = 0.99999999999432
we want it to be the nearest integer, and the value could be negative
def rounder(num):
if num < 0:
return math.floor(num)
else:
return math.ceil(num)