|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<reference xmlns="http://docbook.org/ns/docbook" xml:id="enum.roundingmode" role="enum"> |
| 3 | + <title>The RoundingMode Enum</title> |
| 4 | + <titleabbrev>RoundingMode</titleabbrev> |
| 5 | + |
| 6 | + <partintro> |
| 7 | + <section xml:id="enum.roundingmode.intro"> |
| 8 | + &reftitle.intro; |
| 9 | + <simpara> |
| 10 | + The <enumname>RoundingMode</enumname> enum is used to specify how rounding |
| 11 | + should be performed for <function>round</function>, |
| 12 | + <function>bcround</function>, and <methodname>BCMath::round</methodname>. |
| 13 | + </simpara> |
| 14 | + </section> |
| 15 | + |
| 16 | + <section xml:id="enum.roundingmode.synopsis"> |
| 17 | + &reftitle.enumsynopsis; |
| 18 | + |
| 19 | + <enumsynopsis> |
| 20 | + <enumname>RoundingMode</enumname> |
| 21 | + |
| 22 | + <enumitem> |
| 23 | + <enumidentifier>HalfAwayFromZero</enumidentifier> |
| 24 | + <enumitemdescription> |
| 25 | + Round to the nearest integer. |
| 26 | + If the decimal part is <literal>5</literal>, |
| 27 | + round to the integer with the larger absolute value. |
| 28 | + </enumitemdescription> |
| 29 | + </enumitem> |
| 30 | + |
| 31 | + <enumitem> |
| 32 | + <enumidentifier>HalfTowardsZero</enumidentifier> |
| 33 | + <enumitemdescription> |
| 34 | + Round to the nearest integer. |
| 35 | + If the decimal part is <literal>5</literal>, |
| 36 | + round to the integer with the smaller absolute value. |
| 37 | + </enumitemdescription> |
| 38 | + </enumitem> |
| 39 | + |
| 40 | + <enumitem> |
| 41 | + <enumidentifier>HalfEven</enumidentifier> |
| 42 | + <enumitemdescription> |
| 43 | + Round to the nearest integer. |
| 44 | + If the decimal part is <literal>5</literal>, |
| 45 | + round to the even integer. |
| 46 | + </enumitemdescription> |
| 47 | + </enumitem> |
| 48 | + |
| 49 | + <enumitem> |
| 50 | + <enumidentifier>HalfOdd</enumidentifier> |
| 51 | + <enumitemdescription> |
| 52 | + Round to the nearest integer. |
| 53 | + If the decimal part is <literal>5</literal>, |
| 54 | + round to the odd integer. |
| 55 | + </enumitemdescription> |
| 56 | + </enumitem> |
| 57 | + |
| 58 | + <enumitem> |
| 59 | + <enumidentifier>TowardsZero</enumidentifier> |
| 60 | + <enumitemdescription> |
| 61 | + Round to the nearest integer with a smaller or equal absolute value. |
| 62 | + </enumitemdescription> |
| 63 | + </enumitem> |
| 64 | + |
| 65 | + <enumitem> |
| 66 | + <enumidentifier>AwayFromZero</enumidentifier> |
| 67 | + <enumitemdescription> |
| 68 | + Round to the nearest integer with a greater or equal absolute value. |
| 69 | + </enumitemdescription> |
| 70 | + </enumitem> |
| 71 | + |
| 72 | + <enumitem> |
| 73 | + <enumidentifier>NegativeInfinity</enumidentifier> |
| 74 | + <enumitemdescription> |
| 75 | + Round to the largest integer that is smaller or equal. |
| 76 | + </enumitemdescription> |
| 77 | + </enumitem> |
| 78 | + |
| 79 | + <enumitem> |
| 80 | + <enumidentifier>PositiveInfinity</enumidentifier> |
| 81 | + <enumitemdescription> |
| 82 | + Round to the smallest integer that is greater or equal. |
| 83 | + </enumitemdescription> |
| 84 | + </enumitem> |
| 85 | + |
| 86 | + </enumsynopsis> |
| 87 | + </section> |
| 88 | + </partintro> |
| 89 | +</reference> |
| 90 | +<!-- Keep this comment at the end of the file |
| 91 | +Local variables: |
| 92 | +mode: sgml |
| 93 | +sgml-omittag:t |
| 94 | +sgml-shorttag:t |
| 95 | +sgml-minimize-attributes:nil |
| 96 | +sgml-always-quote-attributes:t |
| 97 | +sgml-indent-step:1 |
| 98 | +sgml-indent-data:t |
| 99 | +indent-tabs-mode:nil |
| 100 | +sgml-parent-document:nil |
| 101 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 102 | +sgml-exposed-tags:nil |
| 103 | +sgml-local-catalogs:nil |
| 104 | +sgml-local-ecat-files:nil |
| 105 | +End: |
| 106 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 107 | +vim: et tw=78 syn=sgml |
| 108 | +vi: ts=1 sw=1 |
| 109 | +--> |
0 commit comments