Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[Rational] method signatures; method new
  • Loading branch information
moritz committed Jun 25, 2012
1 parent 25a4b5f commit 6d2c1d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/Rational.pod
Expand Up @@ -12,20 +12,34 @@ Built into Perl 6 are L<Rat> and L<FatRat>, which both do the C<Rational> role.
=head2 methods
=head3 new
method new(NuT:D $numerator, DenomT:D $denominator) returns Rational:D
Creates a new rational object from numerator and denominator.
=head3 numerator
method numerator(Rational:D:) returns NuT:D
Returns the numerator.
=head3 denominator
method denominator(Rational:D:) returns DenomT:D
Returns the denominator.
=head3 nude
method nude(Rational:D:) returns Positional
Returns a list of the numerator and denominator.
=head3 norm
method norm(Rational:D:) returns Rational:D
Returns a normalized Rational object, ie with positive denominator, and
numerator and denominator coprime.
Expand Down

0 comments on commit 6d2c1d8

Please sign in to comment.