Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » distance between two objects c++
Re: distance between two objects c++ [message #432408 is a reply to message #432316] Fri, 09 July 2010 02:01 Go to previous messageGo to previous message
saberhawk
Messages: 1068
Registered: January 2006
Location: ::1
Karma:
General (1 Star)
Also, a rather useful optimization when you don't need the exact length (like if you are comparing distances) is to use the squared length instead of the actual length. By doing so you can avoid the square root operation which is rather expensive.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C++ void On_Player_Death???
Next Topic: proximity speech
Goto Forum:
  


Current Time: Wed Dec 04 07:26:35 MST 2024

Total time taken to generate the page: 0.00811 seconds