Before I discovered atan2, I had to make “atan2 at home”.