[Snippet] Distance Between Two Points

shanker

Well-Known Member
Joined
Sep 18, 2016
Messages
238
Likes
2
Points
33
Location
Romania
#1
Code:
:DistanceBetweenTwoPoints
0063: [email protected] -= [email protected]  // (float)
0063: [email protected] -= [email protected]  // (float)
0063: [email protected] -= [email protected]  // (float)    
006B: [email protected] *= [email protected]  // (float)
006B: [email protected] *= [email protected]  // (float)
006B: [email protected] *= [email protected]  // (float)        
005B: [email protected] += [email protected]  // (float)
005B: [email protected] += [email protected]  // (float)    
01FB: [email protected] = square_root [email protected]
ret 1 [email protected]
Usage:

Code:
:sadpepe: For no SF users
 

DavidRO99

Well-Known Member
Joined
Nov 5, 2017
Messages
57
Likes
1
Points
13
#2
Very useful thanks for sharing what you used to convert it to C++ citar fals csf
 

springfield

Well-Known Member
Staff member
Joined
Feb 18, 2005
Messages
2,935
Likes
17
Points
88
Website
www.ugbase.eu

DavidRO99

Well-Known Member
Joined
Nov 5, 2017
Messages
57
Likes
1
Points
13
#5
I guess this should show you how the calculations actually work, instead of just being like "hey it works idc". It is also useful for translating to other programming languages.
 
Top