Sha256: b6e1ec8cc902fa0cb1c0f553a58d8937b48bbffed7f33463babbbfbee42501d4

Contents?: true

Size: 331 Bytes

Versions: 2

Compression:

Stored size: 331 Bytes

Contents

Math.n_pow = function(number,n){
  var result = 1;
  for(var i=0;i<n;i++){
     result = result*number;
  }
  return result;
};

Math.decimal_point = function(str,point_number){
  var float = parseFloat(str);
  if(!float){
    return 0;
  }
  var point = Math.n_pow(10,point_number);
  return Math.round(float * point) / point;
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jextend-0.1.4 vendor/assets/javascripts/jextend/math.js
jextend-0.1.3 vendor/assets/javascripts/jextend/math.js