Arduino Programming Language: Sin

Name

sin()

Description

Calculates the sine of an angle that it is expressed in radians(the radians value are between 0 and 6,28). 
It returns values between -1 and 1.

Syntax

sin(rad)

Parameters

  • rad: an angle measured in radians (PI to -PI)

Returns

float : a value between -1 and 1

Usage

Application

Examples

double x=sin(0); // x=0;
double y=sin(1,57); // y=1;

Related Functions


Based on the reference originally written by Arduino Community,  wiring.org.co and  arduino.cc