Add new fn: quantise

Round value to the nearest multiple of resolution.