Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.math.cbrt.js 334B

123456789101112131415
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var sign = require('../internals/math-sign');
  4. var abs = Math.abs;
  5. var pow = Math.pow;
  6. // `Math.cbrt` method
  7. // https://tc39.es/ecma262/#sec-math.cbrt
  8. $({ target: 'Math', stat: true }, {
  9. cbrt: function cbrt(x) {
  10. var n = +x;
  11. return sign(n) * pow(abs(n), 1 / 3);
  12. }
  13. });