main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
334 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 | var $ = require('../internals/export');
|
---|
3 | var sign = require('../internals/math-sign');
|
---|
4 |
|
---|
5 | var abs = Math.abs;
|
---|
6 | var pow = Math.pow;
|
---|
7 |
|
---|
8 | // `Math.cbrt` method
|
---|
9 | // https://tc39.es/ecma262/#sec-math.cbrt
|
---|
10 | $({ target: 'Math', stat: true }, {
|
---|
11 | cbrt: function cbrt(x) {
|
---|
12 | var n = +x;
|
---|
13 | return sign(n) * pow(abs(n), 1 / 3);
|
---|
14 | }
|
---|
15 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.