Wiki > TV3D65 Index > TVMathLibrary

GetDistanceVec3D

DESCRIPTION

Calculates the distance between two TV_3DVECTOR vectors

DECLARATION

VB.NET GetDistanceVec3D(v1 As TV_3DVECTOR , v2 As TV_3DVECTOR) As Single
C++ float GetDistanceVec3D(cTV_3DVECTOR* v1 , cTV_3DVECTOR* v2)

PARAMETERS

NAMEOPTIONALDESCRIPTION
v1NoFirst vector
v2NoSecond vector

RETURN VALUE

Single Distance between the two vectors

EXAMPLES

ExampleBasic example.

TIPS

  • you can also calculate the distance between the vectors manually by using the following formula: srqrt( (x1-x2)^2 + (y1-y2)^2 + (z1-z2)^2 )
 
tvmathlibrary/getdistancevec3d.txt · Last modified: 2010/05/07 13:36 by 129.215.4.85