Raised This Month: $ Target: $400
 0% 

Origin -> Units


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-03-2010 , 23:03   Re: Origin -> Units
Reply With Quote #4

If you want to find distance between 2 origins you can do it this way:
PHP Code:
    new Float:o[3], Float:v[3]
    
//now store your origins in o and v
    
v[0] = v[0]-o[0]
    
v[1] = v[1]-o[1]
    
v[2] = v[2]-o[2]
    new 
Float:distance floatsqroot(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]) 
__________________
Impossible is Nothing
Sylwester is offline
 



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 07:26.


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