A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/cbrt below:

Math.cbrt() - JavaScript | MDN

Math.cbrt()

Baseline Widely available

Math.cbrt() 函数返回任意数字的立方根。

语法 参数 返回值

给定数字的立方根

描述

该方法为 Math 的静态方法,因此请直接通过 Math.cbrt() 方式调用。

而不是作为你创建的 Math 对象的方法 (Math 不是构造函数)。

cbrt 是 "cube root" 的缩写,意思是立方根。

示例 使用 Math.cbrt()
Math.cbrt(NaN); // NaN
Math.cbrt(-1); // -1
Math.cbrt(-0); // -0
Math.cbrt(-Infinity); // -Infinity
Math.cbrt(0); // 0
Math.cbrt(1); // 1
Math.cbrt(Infinity); // Infinity
Math.cbrt(null); // 0
Math.cbrt(2); // 1.2599210498948732
规范 浏览器兼容性 参见

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4