Skip to content

Commit b1e8212

Browse files
author
Jan-Olof Hendig
committed
Added documentation for the reals method plus some examples for re and im
1 parent ac18efb commit b1e8212

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/Type/Complex.pod

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Usage:
4646
4747
Returns the real part of the complex number.
4848
49+
say (3+5i).re; # 3
50+
4951
=head2 method im
5052
5153
Defined as:
@@ -58,6 +60,22 @@ Usage:
5860
5961
Returns the imaginary part of the complex number.
6062
63+
say (3+5i).im; # 5
64+
65+
=head2 method reals
66+
67+
Defined as:
68+
69+
method reals(Complex:D:) returns Positional:D
70+
71+
Usage:
72+
73+
COMPLEX.reals
74+
75+
Returns a two-element list containing the real and imaginary parts for this value.
76+
77+
say (3+5i).reals; # (3 5)
78+
6179
=head2 method isNaN
6280
6381
Defined as:

0 commit comments

Comments
 (0)