Package Exports
- decimal-adjust
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (decimal-adjust) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
decimal-adjust.js
Decimal adjustment of a number.
Install
npm install decimal-adjustAPI
decimalAdjust(type, value, exp)
Params
- type (
String) The type of adjustment. - value (
Number) The number. - exp (
Integer) The exponent (the 10 logarithm of the adjustment base).
Returns
- (
Number) The adjusted value.
Example
var decimalAdjust = require('decimal-adjust');
Math.round10 = function(value, exp) {
return decimalAdjust('round', value, exp);
};
Math.floor10 = function(value, exp) {
return decimalAdjust('floor', value, exp);
};
Math.ceil10 = function(value, exp) {
return decimalAdjust('ceil', value, exp);
};