From aaa542d894ab36145c02d854b71d77c8dc51c01c Mon Sep 17 00:00:00 2001 From: BurdetteLamar Date: Fri, 26 Jul 2024 15:11:04 +0100 Subject: Doc for some #ceil and #floor --- numeric.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index 00826a6543..7336f9618f 100644 --- a/numeric.c +++ b/numeric.c @@ -2235,10 +2235,6 @@ flo_ndigits(int argc, VALUE *argv) * | -4 | 10000 | -20000 | * | -5 | 100000 | -100000 | * | -6 | 1000000 | -1000000 | - * | -7 | 10000000 | -10000000 | - * | -8 | 100000000 | -100000000 | - * | -9 | 1000000000 | -1000000000 | - * | -10 | 10000000000 | 0 | * * Note that the limited precision of floating-point arithmetic * may lead to surprising results: @@ -2744,13 +2740,16 @@ flo_truncate(int argc, VALUE *argv, VALUE num) /* * call-seq: - * floor(digits = 0) -> integer or float + * floor(ndigits = 0) -> float or integer * - * Returns the largest number that is less than or equal to +self+ with - * a precision of +digits+ decimal digits. + * Returns the largest float or integer that is less than or equal to +self+, + * as specified by the given `ndigits`, + * which must be an + * [integer-convertible object](rdoc-ref:implicit_conversion.rdoc@Integer-Convertible+Objects). * - * \Numeric implements this by converting +self+ to a Float and - * invoking Float#floor. + * Equivalent to self.to_f.floor(ndigits). + * + * Related: #ceil, Float#floor. */ static VALUE -- cgit v1.2.3