Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given two angles (the starts and end of an arc), e.g. 90 degrees to 180 degrees, I need to output the starting and ending degrees of a small arc, and a large arc.

In this case the small arc is simply 90 to 180 (no change needed). The large arc would be 90 to -180.

Another example:

45degrees -> 270degrees
   Small: 45degrees -> -90degrees
   Large: 45degrees -> 270degrees (no change from original)

I originally thought that subtracting 360 from one of the angles would work, but it doesn't seem to work in all cases.

Any ideas?

share|cite|improve this question
I can't think of any case where subtracting 360 doesn't work. What did you have in mind? – Gerry Myerson Jan 28 '12 at 11:20
For example, if starting with 315degrees & 90degrees, we could only get the "smaller arc" by subtracting 360 from 315, and not touching 90. So, in this case, changing the starting degree works, but the cases above, changing the ending degree works. So, if the solution is to subtract 360, how do I decide which one to subtract 360 from? – 999 Jan 28 '12 at 11:30
Assuming all angles given to you initially are between 0 and 360 degrees, can't you just subtract 360 from the larger angle? (I think this is what Gerry meant) – Sp3000 Jan 28 '12 at 11:32
Ah, I see. Okay, I'll try that and report back. Thank you – 999 Jan 28 '12 at 11:34

Is this what you need?

With $\color{darkgreen}{\theta_2}\ge\color{maroon}{\theta_1}$.

The pink arc starts at $\color{darkblue}{\theta_2-360^\circ}$ and ends at $\color{maroon}{\theta_1}$.

The orange arc starts at $\color{maroon}{\theta_1}$ and ends at $\color{darkgreen}{\theta_2}$.

enter image description here

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.