Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
309 bytes
|
Line | |
---|
1 | var $ = require('../internals/export');
|
---|
2 | var sign = require('../internals/math-sign');
|
---|
3 |
|
---|
4 | var abs = Math.abs;
|
---|
5 | var pow = Math.pow;
|
---|
6 |
|
---|
7 | // `Math.cbrt` method
|
---|
8 | // https://tc39.es/ecma262/#sec-math.cbrt
|
---|
9 | $({ target: 'Math', stat: true }, {
|
---|
10 | cbrt: function cbrt(x) {
|
---|
11 | return sign(x = +x) * pow(abs(x), 1 / 3);
|
---|
12 | }
|
---|
13 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.