mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* numeric.c: Fix doc for #remainder [ruby-core:18796]
* ext/bigdecimal/bigdecimal.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6092bb2aff
commit
28d641911b
2 changed files with 4 additions and 9 deletions
|
|
@ -1069,10 +1069,7 @@ BigDecimal_divremain(VALUE self, VALUE r, Real **dv, Real **rv)
|
|||
|
||||
/* Returns the remainder from dividing by the value.
|
||||
*
|
||||
* If the values divided are of the same sign, the remainder is the same as
|
||||
* the modulus (see divmod).
|
||||
*
|
||||
* Otherwise, the remainder is the modulus minus the value divided by.
|
||||
* <code>x.remainder(y)</code> means <code>x-y*(x/y).truncate.</code>
|
||||
*/
|
||||
static VALUE
|
||||
BigDecimal_remainder(VALUE self, VALUE r) /* remainder */
|
||||
|
|
|
|||
|
|
@ -366,11 +366,9 @@ num_modulo(x, y)
|
|||
* call-seq:
|
||||
* num.remainder(numeric) => result
|
||||
*
|
||||
* If <i>num</i> and <i>numeric</i> have different signs, returns
|
||||
* <em>mod</em>-<i>numeric</i>; otherwise, returns <em>mod</em>. In
|
||||
* both cases <em>mod</em> is the value
|
||||
* <i>num</i>.<code>modulo(</code><i>numeric</i><code>)</code>. The
|
||||
* differences between <code>remainder</code> and modulo
|
||||
* <code>x.remainder(y)</code> means <code>x-y*(x/y).truncate.</code>
|
||||
*
|
||||
* The differences between <code>remainder</code> and modulo
|
||||
* (<code>%</code>) are shown in the table under <code>Numeric#divmod</code>.
|
||||
*/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue