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.
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