Skip to content
Vašek edited this page Jan 13, 2019 · 8 revisions

tan

Returns the tangent of value in radians

Syntax:

tan(x)
Argument Description
double x The angle in radians to tangent

Returns: double

Description:

In a right angled triangle tan(x) = Opposite / Adjacent. If you want to use degrees instead of radians use function dtan().

This function will accept any number except pi/2 plus-minus multiples of pi. In that case the function return error due to returning infinity.

Example:

double value;
value = tan(5);

This code will set value to -3,380515.

Back to number_functions

Clone this wiki locally