From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../reference/global_objects/math/cbrt/index.html | 91 ++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 files/fr/web/javascript/reference/global_objects/math/cbrt/index.html (limited to 'files/fr/web/javascript/reference/global_objects/math/cbrt/index.html') diff --git a/files/fr/web/javascript/reference/global_objects/math/cbrt/index.html b/files/fr/web/javascript/reference/global_objects/math/cbrt/index.html new file mode 100644 index 0000000000..fe6c19aa04 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/math/cbrt/index.html @@ -0,0 +1,91 @@ +--- +title: Math.cbrt() +slug: Web/JavaScript/Reference/Objets_globaux/Math/cbrt +tags: + - ECMAScript 2015 + - JavaScript + - Math + - Méthode + - Reference + - polyfill +translation_of: Web/JavaScript/Reference/Global_Objects/Math/cbrt +--- +
{{JSRef}}
+ +

La fonction Math.cbrt() renvoie la racine cubique (le nom anglais étant cubic root) d'un nombre :

+ +

Math.cbrt(x)=x3=le seulytel quey3=x\mathtt{Math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x

+ +
{{EmbedInteractiveExample("pages/js/math-cbrt.html")}}
+ + + +

Syntaxe

+ +
Math.cbrt(x)
+ +

Paramètres

+ +
+
x
+
Un nombre.
+
+ +

Valeur de retour

+ +

La racine cubique du nombre passé en argument.

+ +

Description

+ +

cbrt() étant une méthode statique de Math, il faut utiliser Math.cbrt(), et non pas la méthode d'un autre objet créé (Math n'est pas un constructeur).

+ +

Exemple

+ +

Utiliser 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
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES6', '#sec-math.cbrt', 'Math.cbrt')}}{{Spec2('ES6')}}Définition initiale.
{{SpecName('ESDraft', '#sec-math.cbrt', 'Math.cbrt')}}{{Spec2('ESDraft')}}
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.builtins.Math.cbrt")}}

+ +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf