diff --git a/reference/math/functions/round.xml b/reference/math/functions/round.xml index 89786f83a1..e8b9dc0aba 100644 --- a/reference/math/functions/round.xml +++ b/reference/math/functions/round.xml @@ -1,6 +1,6 @@ - + @@ -13,7 +13,7 @@ floatround intfloatnum intprecision0 - intmodePHP_ROUND_HALF_UP + intRoundingModemodeRoundingMode::HalfAwayFromZero Retourne la valeur arrondie de num @@ -78,7 +78,7 @@ mode - Utilisez une des constantes suivantes pour spécifier le mode d'arrondi. + Utilisez RoundingMode ou l'une des constantes suivantes pour spécifier la méthode d'arrondi. @@ -119,6 +119,7 @@ + Toutefois, noter que certaines méthodes nouvellement ajoutés n'existent que dans RoundingMode. @@ -152,6 +153,12 @@ + + 8.4.0 + + Quatre nouvelles méthodes d'arrondi ont été ajoutés. + + 8.4.0 @@ -247,14 +254,14 @@ float(0) + + Exemple d'utilisation de <enumname>RoundingMode</enumname> + + %+.17g\n", $mode->name, $number, round($number, 0, $mode)); + } + echo "\n"; +} +?> +]]> + + &example.outputs; + + +9 +HalfAwayFromZero : +9.5 -> +10 +HalfAwayFromZero : -3.5 -> -4 + +HalfTowardsZero : +8.5 -> +8 +HalfTowardsZero : +9.5 -> +9 +HalfTowardsZero : -3.5 -> -3 + +HalfEven : +8.5 -> +8 +HalfEven : +9.5 -> +10 +HalfEven : -3.5 -> -4 + +HalfOdd : +8.5 -> +9 +HalfOdd : +9.5 -> +9 +HalfOdd : -3.5 -> -3 + +TowardsZero : +8.5 -> +8 +TowardsZero : +9.5 -> +9 +TowardsZero : -3.5 -> -3 + +AwayFromZero : +8.5 -> +9 +AwayFromZero : +9.5 -> +10 +AwayFromZero : -3.5 -> -4 + +NegativeInfinity : +8.5 -> +8 +NegativeInfinity : +9.5 -> +9 +NegativeInfinity : -3.5 -> -4 + +PositiveInfinity : +8.5 -> +9 +PositiveInfinity : +9.5 -> +10 +PositiveInfinity : -3.5 -> -3 +]]> + +