# LineToCircle

Computes the minimum distance between a line and a circle.

## LineToCircle Inputs

Parameter | Description
Line | Specifies the coordinates of the line.
X 0 | The x-coordinate of the first endpoint of the line.
Y 0 | The y-coordinate of the first endpoint of the line.
X 1 | The x-coordinate of the second endpoint of the line.
Y 1 | The y-coordinate of the second endpoint of the line.
Circle | Specifies the coordinates and the size of the circle.
X | The x-coordinate of the center of the circle.
Y | The y-coordinate of the center of the circle.
Radius | The radius of the circle, in pixels.
Show | Specifies the display mode for the function's graphical overlays on top of the image.
0 = hide all (default) | All graphics will be hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | A line segment showing the minimum distance between the input line and the circle will be displayed at all times.
2 = input and result graphics | The input line and circle, and the line segment between them, will be displayed at all times.

## LineToCircle Outputs

Returns | If the line and the circle do not intersect, the function returns a Dist data structure containing a point on the line, a point on the circle, the distance between points, and the angle of the directed distance. If the line and circle intersect, the function returns a Dist data structure containing the two points of intersection, the angle of line segment, and a distance of exactly zero.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

## LineToCircle Vision Data Access Functions

The following Dist Vision Data Access Functions are automatically inserted into the spreadsheet to create the result table:

X0 | GetX(Dist, 0) | If not intersecting, the x-coordinate of a point on the first circle. If intersecting, the x-coordinate of the first point of intersection.
Y0 | GetY(Dist, 0) | If not intersecting, the y-coordinate of a point on the first circle. If intersecting, the y-coordinate of the first point of intersection.
X1 | GetX(Dist, 1) | If not intersecting, the x-coordinate of a point on the second circle. If intersecting, the x-coordinate of the second point of intersection.
Y1 | GetY(Dist, 1) | If not intersecting, the y-coordinate of a point on the second circle. If intersecting, the y-coordinate of the second point of intersection.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | If not intersecting, the distance between points; otherwise 0.