Function PointToDegree(ByVal x As Double, ByVal y As Double) As Double
Const PI As Double = 3.14159265359
Dim Hyp As Double
Hyp = Sqr(x * x + y * y)
PointToDegree = Asin(y / Hyp) * 180 / PI
End Function
Function Asin(ByVal Number As Double) As Double
Asin = Atn(Number / Sqr(-Number * Number + 1))
End Function