Math.trunc Math.trunc = Math.trunc || function(x) { return x 0 ? Math.ceil(x) : Math.floor(x);}Math.sign = Math.sign || function(x) { x = +x; // convert to number if (x === 0 || isNaN(x)) { return x; } return x 0 ? 1 : -1;}Math.cbrt = Math.
Math.trunc = Math.trunc || function(x) {
return x < 0 ? Math.ceil(x) : Math.floor(x);
}
Math.sign = Math.sign || function(x) {
x = +x; // convert to number
if (x === 0 || isNaN(x)) {
return x;
}
return x > 0 ? 1 : -1;
}
Math.cbrt = Math.cbrt || function(x) {
var y = Math.pow(Math.abs(x), 1/3);
return x < 0 ? -y : y;
}
