Go Down

Topic: Inverse trig functions (Read 8611 times) previous topic - next topic

estiers

Hi all, I am just getting started with the Arduino and as I was reading through the programming reference I saw that the trig functions sin, cos, and tan are supported, but it looks like the inverse functions arcsin, arccos, and arctan are not.

My application will need some of these inverse functions. Is there any easy way to add them in? Do I need to modify and rebuild the Arduino compiler to do it?

Thanks much!


Collin80

Looks like those functions exist to me. You can use avr lib-c from arduino:

http://www.nongnu.org/avr-libc/user-manual/modules.html

estiers

Oh cool. I was going by the reference list given at http://arduino.cc/en/Reference/Extended which didn't show the inverse functions. I just added the library reference and the code compiled without errors.

Thanks much!

follower

It's an open secret around these parts that the Arduino uses C/C++ "under the hood". :-) The Arduino documentation is deliberately a subset of all available functions and syntax in order to keep the learning overhead low.

--Phil.

Go Up