This is a proper way to get degrees from two positions. Zero angle as seen on screen would start from the right side, up goes 90 and left 180 etc… I skipped the part of using radians here, since radians are somewhat low level and their values used as pure only on trigonometry functions.