   check if a circle is covered
  hello,i have a collection of angle-pairs that define the sector of a circle.for example:45-90 defines the lower right part of the circle310-320 defines some part in the upper left area of the circle.now i want to make a function that checks if the collection of angle-pairs cover all the circle? the above example would result in false, since there is nothing covering 90-310 for example.pairs may overlap.thanks for any help or starting points to develop an algorithm that checks this!   
  Sort the pairs by the lowest angle in each pair, in increasing order. Then loop through the sorted list, and check if the higher angle in each pair is smaller than the lower angle in the next pair. If that is so, then you have a gap. If you start at 0 and reach 360 without a gap, then the circle is covered.You might have to do some extra checking to see if any pair wraps around the circle, depending on how you allow negative angles or angles larger than 360.   ;  thank you! that is a good idea!and yes, i do infact allow angles smaller than 0 and larger than 360. and that results in anglepairs like this: -20 20   