Calculates the tangent of an angle (in radians). The result will be between negative infinity and infinity.
Use the following function to calculate the tangent of a given angle in radians:
tan(rad)
The function admits the following parameter:
rad: The angle in radians. Allowed data types: float.
The function returns the tangent of the angle. Data type: double.
float angle = (2.0 / 3.0) * M_PI; // in radians
double res = 0;
void setup() {
Serial.begin(9600);
res = tan(angle);
Serial.print("The angle tangent is: ");
Serial.println(res);
}
void loop() {
}