Quick question
#1

Hmmm i've been looking at certain distance checking functions, and cant figure out why the coord's are squard, can anyone help me understand thing (yes, i do know about the native function to check distance... this thread isnt a "how do i" thread... its more of a "why?").

ere's an example

Код:
#define PlayerToPoint(%0,%1,%2,%3,%4,%5,%6) \
(((%0 - %3) * (%0 - %3)) + ((%1 - %4) * (%1 - %4)) + ((%2 - %5) * (%2 - %5)) <= %6 * %6)
(x1 - x2)*(x1 - x2)

why is that squared ? can someone help me understand this function more ?
Reply


Messages In This Thread
Quick question - by kazuki - 12.03.2010, 11:27
Re: Quick question - by kazuki - 12.03.2010, 23:59
Re: Quick question - by Babul - 13.03.2010, 01:12

Forum Jump:


Users browsing this thread: 1 Guest(s)