Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 1 KB

README.md

File metadata and controls

31 lines (27 loc) · 1 KB

TurboTrig

Simple Arduino library that speeds up trigonometry functions.
It's based on work by Oscar Liang.

To work

To add the TurboTrig library, simply drag the main folder into the libraries subdirectory of your Arduino IDE sketch folder.

Example

#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() {
}

Features

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;