Hello everyone ,

I'm not really asking a coding question, but more of a concept question for my homework that is baffling me right now.

I will explain it below, but a direct link to my homework is here too if you want to skim it...

http://ranger.uta.edu/~weems/NOTES23.../lab1sum13.pdf

Basically we are given a random amount of cartesian coordinates and the first step is to sort these points via mergesort by the angle they have to the x-axis. My first idea was to change the cartesian coordinates into polar coordinates as it is suggested in the homework. The only problem is that my professor wants us to only use integers (no doubles, floats, etc.) in the code.

This is where I run into my problem of figuring out how to find their angles when dividing two integers can give rounding error.

Any ideas on how to find the angles would be greatly appreciated. No code necessary, just trying to figure out how to convert these accurately at the moment.

Thanks!