Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active April 23, 2016 11:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/dcb38d4248d044a48cb32ebf622d01e1 to your computer and use it in GitHub Desktop.
Save dogbert17/dcb38d4248d044a48cb32ebf622d01e1 to your computer and use it in GitHub Desktop.
Preliminary attempt to document the method unpolar in Cool.pod
=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