Project

General

Profile

Bug #10576 ยป doc_bigdecimal_p3.patch

patch 3 - stomar (Marcus Stollsteimer), 12/06/2014 07:14 PM

View differences:

ext/bigdecimal/bigdecimal.c 2014-12-06 19:26:03.000000000 +0100
1664 1664
/* call-seq:
1665 1665
 * round(n, mode)
1666 1666
 *
1667
 * Round to the nearest 1 (by default), returning the result as a BigDecimal.
1667
 * Round to the nearest integer (by default), returning the result as a
1668
 * BigDecimal.
1668 1669
 *
1669 1670
 *	BigDecimal('3.14159').round #=> 3
1670 1671
 *	BigDecimal('8.7').round #=> 9
1672
 *	BigDecimal('-9.9').round #=> -10
1671 1673
 *
1672 1674
 * If n is specified and positive, the fractional part of the result has no
1673 1675
 * more than that many digits.
......
1725 1727
/* call-seq:
1726 1728
 * truncate(n)
1727 1729
 *
1728
 * Truncate to the nearest 1, returning the result as a BigDecimal.
1730
 * Truncate to the nearest integer (by default), returning the result as a
1731
 * BigDecimal.
1729 1732
 *
1730 1733
 *	BigDecimal('3.14159').truncate #=> 3
1731 1734
 *	BigDecimal('8.7').truncate #=> 8
1735
 *	BigDecimal('-9.9').truncate #=> -9
1732 1736
 *
1733 1737
 * If n is specified and positive, the fractional part of the result has no
1734 1738
 * more than that many digits.