Arduino Programming Language: Cos

Name

cos()

Description

Calculates the cos of an angle (in radians). The result will be between -1 and 1.

Syntax

cos(rad)

Parameters

  • rad: the angle in radians (float)

Returns

 double: the cos of the angle

Examples

double a=cos(90); // a=-0.45;

Related Functions


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