Trigonometry functions for ESP32

For general Flowcode discussion that does not belong in the other sections.
Post Reply
MJU20
Posts: 353
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Flowcode v10 Trigonometry functions for ESP32

Post by MJU20 »

Is the ESP32 able to perform accurate trigonometry functions with FC10? I'm trying to use some ordinary cosine and sine functions, but I'm getting strange results.

Could there be something in the FC10 documentation (Wiki) that states if it uses radians instead of degrees?

BenR
Matrix Staff
Posts: 1952
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 698 times

Re: Trigonometry functions for ESP32

Post by BenR »

Hello,

Cos and Sin programming functions will generally always use radians rather then degrees. Hope this helps. If you like you can convert your degrees to radians by multiplying by 0.0174533.

If it's still being strange then let us know and I'll investigate.

MJU20
Posts: 353
Joined: Tue Dec 08, 2020 5:11 pm
Has thanked: 101 times
Been thanked: 70 times

Re: Trigonometry functions for ESP32

Post by MJU20 »

Thanks BenR, can some please put the fact that these values are in radians on the Wiki?
For future generations?

BenR
Matrix Staff
Posts: 1952
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 510 times
Been thanked: 698 times

Re: Trigonometry functions for ESP32

Post by BenR »

Yes I've done that for you now, let me know if this is ok.
https://www.flowcode.co.uk/wiki/index.p ... _Functions

Post Reply