Raised This Month: $ Target: $400
 0% 

Calculate Distance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-08-2014 , 03:07   Calculate Distance
Reply With Quote #1

Hello.
I don't know how to calculate distances b/w two coordinates.
I have these:
Code:
Float:f_Origin[3] // our origin Float:v_Origin[3] // other origin
So, what will the distance b/w f_Origin and v_Origin
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-08-2014 , 03:28   Re: Calculate Distance
Reply With Quote #2

Why not search? vector_distance(origin1, origin2 )
Backstabnoob is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 05-08-2014 , 03:44   Re: Calculate Distance
Reply With Quote #3

Pythagoras theorem
__________________
Black Rose is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-08-2014 , 11:46   Re: Calculate Distance
Reply With Quote #4

Quote:
Originally Posted by Black Rose View Post
Pythagoras theorem
I think it's called the Pythagorean Theorem.
WildCard65 is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 05-08-2014 , 14:20   Re: Calculate Distance
Reply With Quote #5

Sorry. Some Swedish slipped in there.
__________________
Black Rose is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-08-2014 , 16:35   Re: Calculate Distance
Reply With Quote #6

Both are correct actually.
Backstabnoob is offline
.Dare Devil.
Veteran Member
Join Date: Sep 2010
Old 05-08-2014 , 16:41   Re: Calculate Distance
Reply With Quote #7

PHP Code:
Float:get_distance_f(float:v[3],Float:v2[3]) 
this is what i use. ( I love fakemeta )

Last edited by .Dare Devil.; 05-08-2014 at 16:41.
.Dare Devil. is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-09-2014 , 04:20   Re: Calculate Distance
Reply With Quote #8

Quote:
Originally Posted by .Dare Devil. View Post
PHP Code:
Float:get_distance_f(float:v[3],Float:v2[3]) 
this is what i use. ( I love fakemeta )
Winner!....
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:46.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode