Last active
April 23, 2016 11:38
-
-
Save dogbert17/dcb38d4248d044a48cb32ebf622d01e1 to your computer and use it in GitHub Desktop.
Preliminary attempt to document the method unpolar in Cool.pod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head2 method unpolar | |
Defined as: | |
method unpolar(Numeric(Cool)) | |
Usage: | |
unpolar NUMERIC, NUMERIC | |
NUMERIC.unpolar(NUMERIC) | |
Coerces the arguments (including the invocant in the method form) to L<Numeric|/type/Numeric>, and returns | |
a complex number from the given polar coordinates. The invocant (or the first argument in sub form) is the magnitude while | |
the argument (i.e. the second argument in sub form) is the angle. The angle is assumed to be in radians. | |
say sqrt(2).unpolar(pi/4); # 1+1i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment