Skip to content

Instantly share code, notes, and snippets.

View nonkit's full-sized avatar
🙂
created a new repository StickerAid

Nonki Takahashi nonkit

🙂
created a new repository StickerAid
View GitHub Profile
@nonkit
nonkit / Math_CartesianToPolar.sb
Last active April 14, 2020 08:39
Small Basic Pseudo Math Object
Sub Math_CartesianToPolar
' Math | convert Cartesian coodinate to polar coordinate
' param x, y - Cartesian coordinate
' return r, a - polar coordinate (0<=a<360)
r = Math.SquareRoot(x * x + y * y)
If x = 0 And y > 0 Then
a = 90 ' [degree]
ElseIf x = 0 And y < 0 Then
a = -90
ElseIf x = 0 And y = 0 Then