[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Code: Center of Triangle



Hi

>
> def CalculateDistance(a, b):
>     x, y, z = b[0] - a[0], b[1] - a[1], b[2] - a[2]
>     dist = x*x + y*y + z*z
>     return dist * dist
>

no offense, but  "x*x + y*y + z*z" is already the distance squared, so
no need for "return dist*dist". (or did you do this on purpose?).

~DR0ID