Dist

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Numeric functions >

Dist

 

Description

 

Return the Distance between two point (X1, Y1) and (X2, Y2)

 

Syntax

 

n = Dist(x1, y1, x2, y2)

 

Returns

 

Number

 

Parameters

 

Name

Type

Optional

Meaning

x1

Numeric

No

x position of the first point

y1

Numeric

No

y position of the first point

x2

Numeric

No

x position of the second point

y2

Numeric

No

y position of the second point

 

Remarks

 

To calculate the Distance, the following formula is used:

 

 

Restrictions

 

See also

 

Examples