reference-en
reference-en copied to clipboard
Updated the documentation of the trigonometry functions.
All three functions have the following signature double (*)(double)
. This is
now reflected in the documentation.
Hi @jfjlaros. Thanks for your contribution. I was able to verify this is correct for the AVR boards:
https://www.nongnu.org/avr-libc/user-manual/group__avr__math.html#func-members
However, it is not so clear to me for the other official Arduino boards architectures, which use the functions from cmath
of the C++ Standard Library:
https://en.cppreference.com/w/cpp/header/cmath
It seems these templates could have either parameter type according to the type of the argument. Did I interpret it incorrectly?
Hmm, interesting.
It seems that these functions are overloaded as float (*)(float)
and long double (*)(long double)
and additionally, there is a template that checks whether the parameter is of an integer type, in which case the result will be of type double
, e.g., double (*)(int)
.
So, what to do?
Can we document the behaviour for the AVR boards and mention that non-AVR boards (may) use the standard library (which arguably should not be documented here)?