lib/vendor/sugar.js
function buildNumber() {
    extendSimilar(number, true, false, 'round,floor,ceil', function(methods, name) {
      methods[name] = function(precision) {
        return round(this, precision, name);
      }
    });
    extendSimilar(number, true, false, 'abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt', function(methods, name) {
      methods[name] = function(a, b) {
        return math[name](this, a, b);
      }
    });
  }
function buildNumber() {
    extendSimilar(number, true, false, 'round,floor,ceil', function(methods, name) {
      methods[name] = function(precision) {
        return round(this, precision, name);
      }
    });
    extendSimilar(number, true, false, 'abs,pow,sin,asin,cos,acos,tan,atan,exp,pow,sqrt', function(methods, name) {
      methods[name] = function(a, b) {
        return math[name](this, a, b);
      }
    });
  }
*
@method round(<precision> = 0)
@returns Number
@short Shortcut for %Math.round% that also allows a <precision>.

@example

(3.241).round()  -> 3
(-3.841).round() -> -4
(3.241).round(2) -> 3.24
(3748).round(-2) -> 3800

**
@method ceil(<precision> = 0)
@returns Number
@short Shortcut for %Math.ceil% that also allows a <precision>.

@example

(3.241).ceil()  -> 4
(-3.241).ceil() -> -3
(3.241).ceil(2) -> 3.25
(3748).ceil(-2) -> 3800

**
@method floor(<precision> = 0)
@returns Number
@short Shortcut for %Math.floor% that also allows a <precision>.

@example

(3.241).floor()  -> 3
(-3.841).floor() -> -4
(3.241).floor(2) -> 3.24
(3748).floor(-2) -> 3700

**
@method [math]()
@returns Number
@short Math related functions are mapped as shortcuts to numbers and are identical. Note that %Number#log% provides some special defaults.

@set
abs
sin
asin
cos
acos
tan
atan
sqrt
exp
pow

@example

(3).pow(3) -> 27
(-3).abs() -> 3
(1024).sqrt() -> 32

*