[Bf-python] Mathutils additions

guignot guignot at wanadoo.fr
Sat Jul 17 11:53:14 CEST 2004


Le Samedi 17 Juillet 2004 12:03, Campbell Barton a écrit :
> Hi, The method is as follows in C
>
>         length = sqrt(pow((v2[0] - v1[0]),2) + pow((v2[1] - v1[1]),2) +
> pow((v2[2] - v1[2]),2) );

Try to avoid pow(x,2), it is too long.

x*x is much faster!





More information about the Bf-python mailing list