Rounds a value to the nearest multiple of 10^n.