Skip to content

Commit f3f02d3

Browse files
committed
Document Rational.floor/.ceiling
They differ from Real's in that they can `fail` POV for failing: rakudo/rakudo@6d70346cbf Propspec for failing: Raku/roast@17761c2e48
1 parent ef3187a commit f3f02d3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/Type/Rational.pod6

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,24 @@ If L<denominator> is C<0>, returns C<Inf>, C<-Inf>, or C<NaN>, based on
5656
whether L<numerator> is a positive number, negative number, or C<0>,
5757
respectively.
5858
59+
=head2 method ceiling
60+
61+
Defined as:
62+
63+
method ceiling(Rational:D: --> Int:D)
64+
65+
Return the smallest integer not greater than the invocant. If L<denominator>
66+
is zero, L<fails|/routine/fail> with C<X::Numeric::DivideByZero>.
67+
68+
=head2 method floor
69+
70+
Defined as:
71+
72+
method floor(Rational:D: --> Int:D)
73+
74+
Return the largest integer not greater than the invocant. If L<denominator>
75+
is zero, L<fails|/routine/fail> with C<X::Numeric::DivideByZero>.
76+
5977
=head2 method isNaN
6078
6179
=for code

0 commit comments

Comments
 (0)