tan

float tan(float value) 

Provides the tangent for the given radians.

Returns:

Tangent of a value in radians

Description:

Returns the tangent of a value in radians.

Version:

PHP 3, PHP 4

See also:

acos() 
asin() 
atan() 
atan2() 
cos() 
sin() 

Example:

Calculate the tangent of a value
$rads = 2 * (pi() / 3); // a 120 degree arc 
$rtan = tan($trad); 
echo "The tangent of $rads is $rtan\n"; 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.