John Payson
()
Tue Sep 03 2002 06:33 PM
Distance function sqrt(a*a+b*b [+c*c...])

Given two or three numbers, byte or int16, what is the best way to compute the "distance" function (square root of the sum of squares)?  Certainly computing the square root of the sum of squares is possible, but it seems needlessly expensive in terms of CPU time.  Can anyone offer a better algorithm for the PIC16x?



Contact Us | Privacy statement HI-TECH Software

Powered by UBB.threads™ 6.5.5