<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.math.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'enum.roundingmode.php',
    1 => 'RoundingMode',
    2 => 'The RoundingMode Enum',
  ),
  'up' => 
  array (
    0 => 'book.math.php',
    1 => 'Math',
  ),
  'prev' => 
  array (
    0 => 'math.constants.php',
    1 => 'Predefined Constants',
  ),
  'next' => 
  array (
    0 => 'ref.math.php',
    1 => 'Math Functions',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/math/roundingmode.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="enum.roundingmode" class="reference">
 <h1 class="title">The RoundingMode Enum</h1>
 

 <div class="partintro"><p class="verinfo">(PHP 8 &gt;= 8.4.0)</p>
  <div class="section" id="enum.roundingmode.intro">
   <h2 class="title">Introduction</h2>
   <p class="simpara">
    The <span class="enumname"><strong class="enumname">RoundingMode</strong></span> enum is used to specify how rounding
    should be performed for <span class="function"><a href="function.round.php" class="function">round()</a></span>,
    <span class="function"><a href="function.bcround.php" class="function">bcround()</a></span>, and <span class="methodname"><a href="bcmath-number.round.php" class="methodname">BcMath\Number::round()</a></span>.
   </p>
  </div>

  <div class="section" id="enum.roundingmode.synopsis">
   <h2 class="title">Enum synopsis</h2>

   <div class="classsynopsis"><div class="classsynopsisinfo">
    <span class="modifier">enum</span> <strong class="classname"><strong class="enumname">RoundingMode</strong></strong><br/>{</div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">HalfAwayFromZero</span>
     ; //
      Round to the nearest integer.
      If the decimal part is <code class="literal">5</code>,
      round to the integer with the larger absolute value.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">HalfTowardsZero</span>
     ; //
      Round to the nearest integer.
      If the decimal part is <code class="literal">5</code>,
      round to the integer with the smaller absolute value.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">HalfEven</span>
     ; //
      Round to the nearest integer.
      If the decimal part is <code class="literal">5</code>,
      round to the even integer.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">HalfOdd</span>
     ; //
      Round to the nearest integer.
      If the decimal part is <code class="literal">5</code>,
      round to the odd integer.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">TowardsZero</span>
     ; //
      Round to the nearest integer with a smaller or equal absolute value.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">AwayFromZero</span>
     ; //
      Round to the nearest integer with a greater or equal absolute value.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">NegativeInfinity</span>
     ; //
      Round to the largest integer that is smaller or equal.
     <br><br>
    </div>

    <div class="fieldsynopsis">
         <span class="modifier">case</span>  <span class="classname">PositiveInfinity</span>
     ; //
      Round to the smallest integer that is greater or equal.
     <br><br>
    </div>
   }</div>
  </div>
 </div>
</div>
<?php manual_footer($setup); ?>