|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<refentry xml:id="bcmath-number.floor" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 3 | + <refnamediv> |
| 4 | + <refname>BcMath\Number::floor</refname> |
| 5 | + <refpurpose>Rounds down an arbitrary precision number</refpurpose> |
| 6 | + </refnamediv> |
| 7 | + |
| 8 | + <refsect1 role="description"> |
| 9 | + &reftitle.description; |
| 10 | + <methodsynopsis role="BcMath\\Number"> |
| 11 | + <modifier>public</modifier> <type>BcMath\Number</type><methodname>BcMath\Number::floor</methodname> |
| 12 | + <void/> |
| 13 | + </methodsynopsis> |
| 14 | + <simpara> |
| 15 | + Returns the next highest integer value by rounding down |
| 16 | + this object if necessary. |
| 17 | + </simpara> |
| 18 | + </refsect1> |
| 19 | + |
| 20 | + <refsect1 role="parameters"> |
| 21 | + &reftitle.parameters; |
| 22 | + &no.function.parameters;</refsect1> |
| 23 | + |
| 24 | + <!-- returnvalues --> |
| 25 | + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('bcmath-number.ceil')/db:refsect1[@role='returnvalues'])" /> |
| 26 | + |
| 27 | + <refsect1 role="examples"> |
| 28 | + &reftitle.examples; |
| 29 | + <example> |
| 30 | + <title><methodname>BcMath\Number::floor</methodname> example</title> |
| 31 | + <programlisting role="php"> |
| 32 | +<![CDATA[ |
| 33 | +<?php |
| 34 | +$num1 = new BcMath\Number('4.3')->floor(); |
| 35 | +$num2 = new BcMath\Number('9.999')->floor(); |
| 36 | +$num3 = new BcMath\Number('-3.14')->floor(); |
| 37 | +
|
| 38 | +var_dump($num1, $num2, $num3); |
| 39 | +?> |
| 40 | +]]> |
| 41 | + </programlisting> |
| 42 | + &example.outputs; |
| 43 | + <screen> |
| 44 | +<![CDATA[ |
| 45 | +object(BcMath\Number)#2 (2) { |
| 46 | + ["value"]=> |
| 47 | + string(1) "4" |
| 48 | + ["scale"]=> |
| 49 | + int(0) |
| 50 | +} |
| 51 | +object(BcMath\Number)#3 (2) { |
| 52 | + ["value"]=> |
| 53 | + string(1) "9" |
| 54 | + ["scale"]=> |
| 55 | + int(0) |
| 56 | +} |
| 57 | +object(BcMath\Number)#4 (2) { |
| 58 | + ["value"]=> |
| 59 | + string(2) "-4" |
| 60 | + ["scale"]=> |
| 61 | + int(0) |
| 62 | +} |
| 63 | +]]> |
| 64 | + </screen> |
| 65 | + </example> |
| 66 | + </refsect1> |
| 67 | + |
| 68 | + <refsect1 role="seealso"> |
| 69 | + &reftitle.seealso; |
| 70 | + <simplelist> |
| 71 | + <member><function>bcfloor</function></member> |
| 72 | + <member><methodname>BcMath\Number::ceil</methodname></member> |
| 73 | + <member><methodname>BcMath\Number::round</methodname></member> |
| 74 | + </simplelist> |
| 75 | + </refsect1> |
| 76 | + |
| 77 | +</refentry> |
| 78 | +<!-- Keep this comment at the end of the file |
| 79 | +Local variables: |
| 80 | +mode: sgml |
| 81 | +sgml-omittag:t |
| 82 | +sgml-shorttag:t |
| 83 | +sgml-minimize-attributes:nil |
| 84 | +sgml-always-quote-attributes:t |
| 85 | +sgml-indent-step:1 |
| 86 | +sgml-indent-data:t |
| 87 | +indent-tabs-mode:nil |
| 88 | +sgml-parent-document:nil |
| 89 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 90 | +sgml-exposed-tags:nil |
| 91 | +sgml-local-catalogs:nil |
| 92 | +sgml-local-ecat-files:nil |
| 93 | +End: |
| 94 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 95 | +vim: et tw=78 syn=sgml |
| 96 | +vi: ts=1 sw=1 |
| 97 | +--> |
0 commit comments