<< Prev        Next >>

ID : 260

Dist

Function

To return a distance between 2 points.

Syntax

Dist(position 1, position 2)

Guaranteed entry

Position 1
Designate position type, homogeneous translation type and vector type data.
Position 2
Designate position type, homogeneous translation type and vector type data.

Return value

Return a distance between 2 points by double precision real number type data.

Description

A distance between 2 points is returned by double precision real number type data.

Related Terms

Magnitude, Dot, Cross

 

Attention

-

Example

'!TITLE "Measuring Distance between 2 Points"
' Measure the distance from the current position to a position 10 away from the current position in
Y axis direction Sub Sample_Dist Dim aaa As Single Dim bbb As Position Dim ccc As Position bbb = CurPos ccc = Dev( bbb, P( 0, 10, 0, 0, 0, 0 ) ) ' Assign the distance between bbb and ccc aaa = Dist( bbb, ccc ) ' Display the distance between 2 points on the message output window PrintDbg aaa End Sub

ID : 260

<< Prev        Next >>