For each test case, compute the area of a circle cut by an infinite wedge with a given apex, direction, and spread angle.
Medium6GeometryMathImplementationNo attempts yetTime limit2sMemory limit512 MBDecades ago the King of Nlogônia built a huge protective wall around the whole kingdom, and its people have lived in safety ever since. The wall is imposing and heavily reinforced, and it has the shape of a circle that encloses all of the King's lands.
For the past few weeks, however, the people of Nlogônia have been uneasy. Rumor has it that scientists of Quadradônia, a barbarian people living next to Nlogônia, have developed a deadly weapon that turns everything in its sights to dust.
The new weapon is a cannon that fires a proton beam. The beam starts at the cannon's muzzle and spreads out with a spread angle T. The firing direction is given by an angle A, measured counterclockwise from the x axis. In other words, the beam covers an infinite wedge whose apex is the muzzle and which opens by T/2 on each side of direction A. The figure below shows (a) an example attack, (b) what would remain of Nlogônia, and (c) the area that would be destroyed.

Given the coordinates of the cannon, the firing direction, the spread angle of the proton beam, and the center and radius of the protective wall, write a program that computes the area of Nlogônia that will be destroyed.
The input contains several test cases. Each test case consists of two lines.
The first line contains three integers X, Y, R. (X,Y) are the coordinates of the center of the wall's circle (0≤X≤1000, 0≤Y≤1000), and R is its radius (1≤R≤100).
The second line contains four integers P, Q, A, T. (P,Q) is the location of the cannon (0≤P≤1000, 0≤Q≤1000), A is the firing direction in degrees (0≤A≤359), and T is the spread angle, also in degrees (1≤T≤179). The angle A is measured counterclockwise from the x axis. The cannon is always outside Nlogônia, that is, the distance between (X,Y) and (P,Q) is greater than R.
A line on which X, Y, and R are all 0 marks the end of the input. Do not process that line.
For each test case, print one line with the area of Nlogônia that the attack would destroy, rounded to one decimal place. If no area is destroyed, print 0.0.