# MidLineToMidLine

Computes the distance from the midpoint of one line segment to the midpoint of a second line segment.

Inputs

Parameter | Description
Line 0 | Specifies the coordinates of the first line segment.
X 0 | The X coordinate of the first endpoint of the first line.
Y 0 | The Y coordinate of the first endpoint of the first line.
X 1 | The X coordinate of the second endpoint of the first line.
Y 1 | The Y coordinate of the second endpoint of the first line.
Line 1 | Specifies the coordinates of the second line segment.
X 0 | The X coordinate of the first endpoint of the second line.
Y 0 | The Y coordinate of the first endpoint of the second line.
X 1 | The X coordinate of the second endpoint of the second line.
Y 1 | The Y coordinate of the second endpoint of the second line.
Show | Specifies the display mode for the graphical overlays of the function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. on top of the image.
0 = hide all | All graphics are hidden, except when the cell containing the function is highlighted in the spreadsheet.
1 = result graphics only | Cross showing the intersection of the two lines, if any.
2 = input and result graphics | The two input lines and the cross showing their intersection will be displayed at all times.

Outputs

Returns | A Dist data structure containing the directed distance between line segments.
Results | When the function is initially inserted into a cell, a result table is created in the spreadsheet.

Vision Data Access functions

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

Label | Function | Description
--- | --- | ---
X0 | GetX(Dist, 0) | The X coordinate of the first midpoint.
Y0 | GetY(Dist, 0) | The Y coordinate of the first midpoint.
X1 | GetX(Dist, 1) | The X coordinate of the second midpoint.
Y1 | GetY(Dist, 1) | The Y coordinate of the second midpoint.
Angle | GetAngle(Dist) | The angle between the two midpoints.
Distance | GetDistance(Dist) | The distance between the two midpoints.