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
#2

bump ?
Reply
#3

http://mathworld.wolfram.com/RightTriangle.html
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)