From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../reference/global_objects/math/floor/index.html | 97 ---------------------- .../reference/global_objects/math/floor/index.md | 97 ++++++++++++++++++++++ 2 files changed, 97 insertions(+), 97 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/math/floor/index.html create mode 100644 files/fr/web/javascript/reference/global_objects/math/floor/index.md (limited to 'files/fr/web/javascript/reference/global_objects/math/floor') diff --git a/files/fr/web/javascript/reference/global_objects/math/floor/index.html b/files/fr/web/javascript/reference/global_objects/math/floor/index.html deleted file mode 100644 index 4b9a6e5422..0000000000 --- a/files/fr/web/javascript/reference/global_objects/math/floor/index.html +++ /dev/null @@ -1,97 +0,0 @@ ---- -title: Math.floor() -slug: Web/JavaScript/Reference/Global_Objects/Math/floor -tags: - - JavaScript - - Math - - Méthode - - Reference -translation_of: Web/JavaScript/Reference/Global_Objects/Math/floor -original_slug: Web/JavaScript/Reference/Objets_globaux/Math/floor ---- -
{{JSRef}}
- -

La fonction Math.floor(x) renvoie le plus grand entier qui est inférieur ou égal à un nombre x.

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

Syntaxe

- -
Math.floor(x)
- -

Paramètres

- -
-
x
-
Un nombre.
-
- -

Valeur de retour

- -

Un nombre qui représente le plus grand entier inférieur ou égal à la valeur passée en argument.

- -

Description

- -

floor() est une méthode statique de l'objet Math, elle doit toujours être utilisée avec la syntaxe  Math.floor(), elle ne doit pas être utilisée avec un autre objet qui aurait été créé (Math n'est pas un constructeur).

- -
-

Note : Math.floor(null) renvoie 0 et pas {{jsxref("NaN")}}.

-
- -

Exemples

- -

Utiliser Math.floor

- -
Math.floor( 45.95); //  45
-Math.floor( 45.05); //  45
-Math.floor(  4   ); //   4
-Math.floor(-45.05); // -46
-Math.floor(-45.95); // -46
-Math.floor(null);   // 0
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('ES1')}}{{Spec2('ES1')}}Définition initiale. Implémentée avec JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.9', 'Math.floor')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-math.floor', 'Math.floor')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-math.floor', 'Math.floor')}}{{Spec2('ESDraft')}}
- -

Compatibilité des navigateurs

- -

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

- -

Voir aussi

- - diff --git a/files/fr/web/javascript/reference/global_objects/math/floor/index.md b/files/fr/web/javascript/reference/global_objects/math/floor/index.md new file mode 100644 index 0000000000..4b9a6e5422 --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/math/floor/index.md @@ -0,0 +1,97 @@ +--- +title: Math.floor() +slug: Web/JavaScript/Reference/Global_Objects/Math/floor +tags: + - JavaScript + - Math + - Méthode + - Reference +translation_of: Web/JavaScript/Reference/Global_Objects/Math/floor +original_slug: Web/JavaScript/Reference/Objets_globaux/Math/floor +--- +
{{JSRef}}
+ +

La fonction Math.floor(x) renvoie le plus grand entier qui est inférieur ou égal à un nombre x.

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

Syntaxe

+ +
Math.floor(x)
+ +

Paramètres

+ +
+
x
+
Un nombre.
+
+ +

Valeur de retour

+ +

Un nombre qui représente le plus grand entier inférieur ou égal à la valeur passée en argument.

+ +

Description

+ +

floor() est une méthode statique de l'objet Math, elle doit toujours être utilisée avec la syntaxe  Math.floor(), elle ne doit pas être utilisée avec un autre objet qui aurait été créé (Math n'est pas un constructeur).

+ +
+

Note : Math.floor(null) renvoie 0 et pas {{jsxref("NaN")}}.

+
+ +

Exemples

+ +

Utiliser Math.floor

+ +
Math.floor( 45.95); //  45
+Math.floor( 45.05); //  45
+Math.floor(  4   ); //   4
+Math.floor(-45.05); // -46
+Math.floor(-45.95); // -46
+Math.floor(null);   // 0
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES1')}}{{Spec2('ES1')}}Définition initiale. Implémentée avec JavaScript 1.0.
{{SpecName('ES5.1', '#sec-15.8.2.9', 'Math.floor')}}{{Spec2('ES5.1')}}
{{SpecName('ES6', '#sec-math.floor', 'Math.floor')}}{{Spec2('ES6')}}
{{SpecName('ESDraft', '#sec-math.floor', 'Math.floor')}}{{Spec2('ESDraft')}}
+ +

Compatibilité des navigateurs

+ +

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

+ +

Voir aussi

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