Skip to main content
added 120 characters in body
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

Wolfram Language (Mathematica), 14+11=25 bytes

AbsArg[#+I#2]&
AngleVector

Try it online!Try it online!

Input [x,y]/[{r,ϕ}] and output {r,ϕ}/{x,y}.

       #+I#2    convert to complex
AbsArg[     ]   get abs (r) and arg (ϕ)
AngleVector     built-in.

Wolfram Language (Mathematica), 14+11=25 bytes

AbsArg[#+I#2]&
AngleVector

Try it online!

Input [x,y]/[{r,ϕ}] and output {r,ϕ}/{x,y}.

Wolfram Language (Mathematica), 14+11=25 bytes

AbsArg[#+I#2]&
AngleVector

Try it online!

Input [x,y]/[{r,ϕ}] and output {r,ϕ}/{x,y}.

       #+I#2    convert to complex
AbsArg[     ]   get abs (r) and arg (ϕ)
AngleVector     built-in.
Source Link
att
  • 21.7k
  • 2
  • 16
  • 62

Wolfram Language (Mathematica), 14+11=25 bytes

AbsArg[#+I#2]&
AngleVector

Try it online!

Input [x,y]/[{r,ϕ}] and output {r,ϕ}/{x,y}.