Skip to main content
changed to function
Source Link
ojdo
  • 805
  • 8
  • 13

Julia, 1818 25 bytes

anglef(A,B)=angle(B/A)/pi*180 

This assumes that "any convenient form" already allows for A and B to be given as complex numbers. Then, the complex number arithmetic does all the heavy lifting.

Edit: converted snippet to function. 18 byte version only works in the Julia REPL.

Julia, 18 bytes

angle(B/A)/pi*180 

This assumes that "any convenient form" already allows for A and B to be given as complex numbers. Then, the complex number arithmetic does all the heavy lifting.

Julia, 18 25 bytes

f(A,B)=angle(B/A)/pi*180 

This assumes that "any convenient form" already allows for A and B to be given as complex numbers. Then, the complex number arithmetic does all the heavy lifting.

Edit: converted snippet to function. 18 byte version only works in the Julia REPL.

Source Link
ojdo
  • 805
  • 8
  • 13

Julia, 18 bytes

angle(B/A)/pi*180 

This assumes that "any convenient form" already allows for A and B to be given as complex numbers. Then, the complex number arithmetic does all the heavy lifting.