Problems
The distance from the point to the segment
The distance from the point to the segment
Givena segmentinspace (x1, y1, z1) - (x2, y2, z2) and thepoint (x, y, z). Find thedistancefrom thepointtothe segment.
Input
Givenintegersx1, y1, z1, x2, y2, z2, x, y, z. Coordinatesdo not exceed1000.
Output
Bring out thedesiredquantitycupat least 6digits afterthe decimal point.
Input example #1
0 0 0 1 1 1 0 0 1
Output example #1
0.8164965809