# Arduino - Trigonometric Functions

You need to use Trigonometry practically like calculating the distance for moving object or angular speed. Arduino provides traditional trigonometric functions (sin, cos, tan, asin, acos, atan) that can be summarized by writing their prototypes. Math.h contains the trigonometry function's prototype.

## Trigonometric Exact Syntax

```double sin(double x); //returns sine of x radians
double cos(double y); //returns cosine of y radians
double tan(double x); //returns the tangent of x radians
double acos(double x); //returns A, the angle corresponding to cos (A) = x
double asin(double x); //returns A, the angle corresponding to sin (A) = x
double atan(double x); //returns A, the angle corresponding to tan (A) = x
```

### Example

```double sine = sin(2); // approximately 0.90929737091
double cosine = cos(2); // approximately -0.41614685058
double tangent = tan(2); // approximately -2.18503975868
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.7039329,"math_prob":0.97754157,"size":850,"snap":"2020-45-2020-50","text_gpt3_token_len":201,"char_repetition_ratio":0.18439716,"word_repetition_ratio":0.07377049,"special_character_ratio":0.2835294,"punctuation_ratio":0.15584415,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9999442,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-12-01T21:08:17Z\",\"WARC-Record-ID\":\"<urn:uuid:e539b52d-9207-4303-85c0-a12ab5b6d4f2>\",\"Content-Length\":\"27269\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:fbeb46e4-5b97-4616-a4de-3827a1d01022>\",\"WARC-Concurrent-To\":\"<urn:uuid:6e52af9b-4107-4573-b5fe-88d583baa6fe>\",\"WARC-IP-Address\":\"72.21.91.42\",\"WARC-Target-URI\":\"https://www.tutorialspoint.com/arduino/arduino_trigonometric_functions.htm\",\"WARC-Payload-Digest\":\"sha1:UPEFLVYFBLULQCJUBFYNXFQMWWEDQQR7\",\"WARC-Block-Digest\":\"sha1:4WHD3RSKDJYGLMDOVCQIH5QP5DKE3IVH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141681524.75_warc_CC-MAIN-20201201200611-20201201230611-00443.warc.gz\"}"}