We’re preparing your current view and syncing the latest data.
Given three positive integers representing the lengths of two sides of a triangle and the range of the third side, determine the maximum possible height of the triangle that can be constructed. The height is defined as the perpendicular distance from the base to the opposite vertex.
The input consists of three integers representing the two fixed side lengths and the allowable range for the third side length.
Return a single floating point number representing the maximum height of the triangle that can be formed.
1 <= side lengths <= 10^9
Example 1
Input
3 4 5
Output
3.0
Explanation
For sides 3 and 4 with the third side 5, the maximum height from side 3 as base is 3.0.