Simple Arduino library that speeds up trigonometry functions.
It's based on work by Oscar Liang.
To add the TurboTrig library, simply drag the main folder into the libraries subdirectory of your Arduino IDE sketch folder.
#include <TurboTrig.h>
void setup() {
Serial.begin(9600);
Serial.println("sin(15): ");
Serial.println(sin(PI/6));
Serial.println("TurboTrig.sin(PI/6): ");
Serial.println(TurboTrig.sin(15));
Serial.println("TurboTrig.sinx(180/6): ");
Serial.println(TurboTrig.sinx(15));
}
void loop() {
}
The TurboTrig library containes:
sin : which is a sin function in radian;
cos : which is a cos function in radian;
sinx : which is a sin function in degree;
cosx : which is a cos function in degree;
acos : which is a acos function;
asin : which is a asin function;
atan : which is a atan function;