VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Works out the distance between two points.

by Walter Eigner (15 Submissions)
Category: Math/Dates
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 2nd December 2003
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Works out the distance between two points.

Rate Works out the distance between two points.



Function workOutDistance(x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Single
workOutDistance = Math.Sqr(((Abs(x1 - x2)) * (Abs(x1 - x2))) + ((Abs(y1 - y2)) * (Abs(y1 - y2))))
End Function


Download this snippet    Add to My Saved Code

Works out the distance between two points. Comments

No comments have been posted about Works out the distance between two points.. Why not be the first to post a comment about Works out the distance between two points..

Post your comment

Subject:
Message:
0/1000 characters