Hacking the Math.round() method

The Timely Measurements Assignment asks you to round your output to a certain number of decimals. There are many ways to round using javascript, here I'll discuss one way by hacking the Math.round() method.

Let's do some examples:
var x = 2.71828182845;
Math.round(x);
Math.ceil(x);
Math.floor(x);