📅  最后修改于: 2022-03-11 15:03:12.088000             🧑  作者: Mango
function round(number, increment, offset) {
return Math.ceil((number - offset) / increment ) * increment + offset;
}
round(51, 20, 10) // 70
round(70, 20, 10) // 70
round(99, 20, 10) // 110
round(100, 20, 10) // 110