File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -17,27 +17,34 @@ Adding a trailing C<i> to a number literal makes it a Complex, for example
17
17
18
18
= head2 new
19
19
20
- proto method new(*@, *%) {*}
21
- multi method new(Real $re, Real $im)
20
+ proto method new(*@, *%) {*} returns Complex:D
21
+ multi method new(Real $re, Real $im) returns Complex:D
22
22
23
23
Creates a new C < Complex > object from a the real and imaginary part.
24
24
25
25
= head2 re
26
26
27
- method re(Complex:D:) return Real:D
27
+ method re(Complex:D:) returns Real:D
28
28
29
29
Returns the real part of the complex number
30
30
31
31
= head2 im
32
32
33
- method im(Complex:D:) return Real:D
33
+ method im(Complex:D:) returns Real:D
34
34
35
35
Returns the imaginary part of the complex number
36
36
37
37
= head2 isNaN
38
38
39
- method isNaN(Complex:D:) return Bool:D
39
+ method isNaN(Complex:D:) returns Bool:D
40
40
41
41
Returns true if the real or imaginary part is C < NaN > (not a number)
42
42
43
+ = head2 polar
44
+
45
+ method polar(Complex:D:) returns Positional:D
46
+
47
+ Returns a two-element list of the polar coordinates for this value,
48
+ ie magnitude and angle in radians.
49
+
43
50
= end pod
You can’t perform that action at this time.
0 commit comments