Wiki > TV3D65 Index > TVMathLibrary

GetDistanceVec2D

DESCRIPTION

Calculates the distance between two TV_2DVECTOR vectors

DECLARATION

VB.NET GetDistanceVec2D(v1 As TV_2DVECTOR , v2 As TV_2DVECTOR) As Single
C++ float GetDistanceVec2D(cTV_2DVECTOR* v1 , cTV_2DVECTOR* v2)

PARAMETERS

NAMEOPTIONALDESCRIPTION
v1NoFirst vector
v2NoSecond vector

RETURN VALUE

Single Distance between the two vectors

EXAMPLES

ExampleBasic example.

TIPS

  • Calculating the distance manually can be done by using this formula: sqrt( (x1-x2)^2 + (y1-y2)^2 )
 
tvmathlibrary/getdistancevec2d.txt · Last modified: 2010/05/07 13:35 by 129.215.4.85