tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: atan2 and sqrt --> in driver

On Tue, Dec 9, 2008 at 7:01 PM, Robert Fritzsche
<> wrote:
> The driver is for the wii-remote, so get 1 byte for x-, y- and z-axis.
> Based on this values I will calculate the pitch = atan2(y,
> sqrt(x^2+z^2)) and yaw = atan2(z, sqrt(x^2+y^2))
You could use approx evaluations.
Set tables with some 32bit predefined values (hint: you can use 32 bit
value as float with integer and fraction parts).

Actually, to calculate sqrt you need the precalculated the n^2, for n
= 2, ..., 99, ...

Just found one link in Google

With Best Regards,
Andy Shevchenko

Home | Main Index | Thread Index | Old Index