Works and gets the angles from -180 to 180. Will do some refactoring and change it to 0-360 deg later