>Simpler - because the restriction is there, the sides of the rectangle are parallel to coordinate axes. So, for the top side, its height is
>
>
if between(90, angle1, angle2)
> top=radius + centerY
>else
> top=max(point1y, point2y)
>endif
>Now for other four sides, just rotate the whole logic by a right angle. There may be a little consideration over the right side - whether we have negative angles or we have angles of more then 360. IOW, what's the format of the given data.
That is right - I read the original posting again, and see that I had misunderstood it.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)