12.03.2010, 11:27
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
(x1 - x2)*(x1 - x2)
why is that squared ? can someone help me understand this function more ?
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)
why is that squared ? can someone help me understand this function more ?