roundres

emlib.mathlib.roundres(x, resolution=1.0)[source]

Round x with given resolution

Example

>>> roundres(0.4, 0.25)
0.5
>>> roundres(1.3, 0.25)
1.25