We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6edbb6 commit 25a4b5fCopy full SHA for 25a4b5f
lib/Rational.pod
@@ -0,0 +1,32 @@
1
+=begin pod
2
+
3
+=head1 Rational
4
5
+ role Rational[::NuT, ::DenomT] does Real { ... }
6
7
+C<Rational> is the common role for numbers that are stored as pairs of
8
+numerator and denominator. It is parameterized by the types of the numerator
9
+and denominator.
10
11
+Built into Perl 6 are L<Rat> and L<FatRat>, which both do the C<Rational> role.
12
13
+=head2 methods
14
15
+=head3 numerator
16
17
+Returns the numerator.
18
19
+=head3 denominator
20
21
+Returns the denominator.
22
23
+=head3 nude
24
25
+Returns a list of the numerator and denominator.
26
27
+=head3 norm
28
29
+Returns a normalized Rational object, ie with positive denominator, and
30
+numerator and denominator coprime.
31
32
+=end pod
0 commit comments