Round of Number

Examples of rounding off numbers.
Round off to the next highest

function round_to(x,y){
x=Math.ceil(x)
while(x%y != 0){
x++
}
return x
}


Round by

function round_to(x,y){

x1=Math.round(x / y) * y // round to nearest
x2=Math.ceil(x / y) * y // round up
x3=Math.floor(x / y) * y // round down

}


divided by =