eolymp
bolt
Try our new interface for solving problems
Problems

The distance from the point to the segment

The distance from the point to the segment

Find the distance from a given point to a specified interval. \InputFile Six numbers - the coordinates of the point and the coordinates of the endpoints. All input data are integers not exceeding modulo \textbf{10000}. \OutputFile One number - the distance from the point to the segment with an accuracy of less than \textbf{10^\{-5\}}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
0 4 2 3 2 5
Output example #1
2.00000