Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added docs for method perl in class Rat
  • Loading branch information
Jan-Olof Hendig committed May 30, 2016
1 parent 258f903 commit 9f39706
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/Type/Rat.pod
Expand Up @@ -35,4 +35,20 @@ C<FatRat> type instead.
C<Rat> objects are immutable.
=head1 methods
=head2 method perl
multi method perl(Rat:D:) returns Str:D
Returns a string representation corresponding to the unambiguous
C<val()>-based representation of rational literals. If the
number can be represented exactly in decimal, it will be. Otherwise uses
the form "C<< <3/5> >>", without internal spaces, and including the
angles that keep the C</> from being treated as a normal division
operator.
say (1/3).perl; # <1/3>
say (2/4).perl; # 0.5
=end pod

0 comments on commit 9f39706

Please sign in to comment.