3 added 15 characters in body
source | link

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x           //after

Rounding:

Math.round(x) //before
0|x+.5        //after

Ceiling:

Math.ceil(x) //before
0|x+1-1ex%1?-9~x:x    //after - not too good,credits butto still@Tomas betterLangkaas

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x //after

Rounding:

Math.round(x) //before
0|x+.5 //after

Ceiling:

Math.ceil(x) //before
0|x+1-1e-9 //after - not too good, but still better

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x           //after

Rounding:

Math.round(x) //before
0|x+.5        //after

Ceiling:

Math.ceil(x) //before
x%1?-~x:x    //after - credits to @Tomas Langkaas
2 added 38 characters in body
source | link

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x //after

Rounding:

Math.round(x) //before
0|x+.5 //after

Ceiling:

Math.ceil(x) //before
0|x+1-1e-9 //after - not too good, but still better

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x //after

Rounding:

Math.round(x) //before
0|x+.5 //after

Ceiling:

Math.ceil(x) //before
0|x+1 //after

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x //after

Rounding:

Math.round(x) //before
0|x+.5 //after

Ceiling:

Math.ceil(x) //before
0|x+1-1e-9 //after - not too good, but still better
1
source | link

Rounding

I know that alternatives to Math.floor() have been posted, but what about the others?

Flooring:

Math.floor(x) //before
0|x //after

Rounding:

Math.round(x) //before
0|x+.5 //after

Ceiling:

Math.ceil(x) //before
0|x+1 //after