# PointToPoint

Computes the directed distance between two points.

Example

In this example, the PointToPoint function is measuring the distance between two points. The angle is calculated based on the position of the first point relative to the second.

## PointToPoint Inputs

Parameter | Description
Point 0 | Specifies the coordinates of the first point, which is used as the origin.
X | The X coordinate of the first point.
Y | The Y coordinate of the first point.
Point 1 | Specifies the coordinates of the second point.
X | The X coordinate of the second point.
Y | The Y coordinate of the second point.
Show | Specifies the display mode for the graphical overlays of the function 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 | A line segment showing the minimum distance between the two input points is displayed at all times.
2 = input and result graphics | The two input points and the line segment between them are displayed at all times.

## PointToPoint Outputs

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

## PointToPoint 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 point.
Y0 | GetY(Dist, 0) | The Y coordinate of the first point.
X1 | GetX(Dist, 1) | The X coordinate of the second point.
Y1 | GetY(Dist, 1) | The Y coordinate of the second point.
Angle | GetAngle(Dist) | The point-to-point angle.
Distance | GetDistance(Dist) | The point-to-point distance.