def rounding(f, r): if not r: return f return round(f / r) * r