Skip to main content

Distance

Calculates the distance between two points.

Unit

dxLines

function Distance(const A,B: TPoint): Integer;

Use this procedure to calculate the shortest distance between two points on screen. The A and B parameters define coordinates of the first and second point respectively.

Note

To use this function, you should include:

Lines‘ in the uses section of a unit (for Delphi) or

‘#include Lines.hpp‘ in the header file (for C++ Builder)