* numeric.c (flo_quo, int_round): added rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c76e698fd8
commit
ef2c92ddf0
24
numeric.c
24
numeric.c
@ -695,6 +695,13 @@ flo_div(VALUE x, VALUE y)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* float.quo(numeric) -> float
|
||||||
|
*
|
||||||
|
* Returns float / numeric.
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
flo_quo(VALUE x, VALUE y)
|
flo_quo(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
@ -2259,6 +2266,8 @@ fixdivmod(long x, long y, long *divp, long *modp)
|
|||||||
if (modp) *modp = mod;
|
if (modp) *modp = mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
VALUE rb_big_fdiv(VALUE x, VALUE y);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* fix.fdiv(numeric) -> float
|
* fix.fdiv(numeric) -> float
|
||||||
@ -2271,8 +2280,6 @@ fixdivmod(long x, long y, long *divp, long *modp)
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
VALUE rb_big_fdiv(VALUE x, VALUE y);
|
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
fix_fdiv(VALUE x, VALUE y)
|
fix_fdiv(VALUE x, VALUE y)
|
||||||
{
|
{
|
||||||
@ -3062,6 +3069,19 @@ int_dotimes(VALUE num)
|
|||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* call-seq:
|
||||||
|
* num.round([ndigits]) -> integer or float
|
||||||
|
*
|
||||||
|
* Rounds <i>flt</i> to a given precision in decimal digits (default 0 digits).
|
||||||
|
* Precision may be negative. Returns a floating point number when +ndigits+
|
||||||
|
* is positive, +self+ for zero, and round down for negative.
|
||||||
|
*
|
||||||
|
* 1.round #=> 1
|
||||||
|
* 1.round(2) #=> 1.0
|
||||||
|
* 15.round(-1) #=> 20
|
||||||
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
int_round(int argc, VALUE* argv, VALUE num)
|
int_round(int argc, VALUE* argv, VALUE num)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user