Answer
x. y. theta.
1. 1. 90
1. -1. -90
1. 0. 0
-1. 1. 135
-1. -1. -135
-1. 0. 180
0. 1. 90
0. -1. -90
0. 0. 0 (tried to make a table I couldn’t)
Work Step by Step
Option Explicit
Function Polar(x, y)
Polar = θ 180 π
End Polar
Dim th As Single, r As Single
Const pi As Single = 3.141593
r = Sqr(x ^ 2 + y ^ 2)
If x < 0 Then
If y > 0 Then
th = Atn(y / x) + pi
ElseIf y < 0 Then
th = Atn(y / x) - pi
Else
th = pi End If
Else
If y > 0 Then
th = pi / 2
ElseIf y < 0 Then
th = -pi / 2
Else
th = 0 End If
End If
Polar = th * 180 / pi
End Function