THE WORLD'S LARGEST WEB DEVELOPER SITE

PHP tan() Function

PHP Math Reference PHP Math Reference

Example

Return the tangent of different numbers:

<?php
echo(tan(M_PI_4) . "<br>");
echo(tan(0.50) . "<br>");
echo(tan(-0.50) . "<br>");
echo(tan(5) . "<br>");
echo(tan(10) . "<br>");
echo(tan(-5) . "<br>");
echo(tan(-10));
?>

Run example »

Definition and Usage

The tan() function returns the tangent of a number.


Syntax

tan(number);

Parameter Description
number Required. Specifies a value in radians

Technical Details

Return Value: The tangent of number
Return Type: Float
PHP Version: 4+

PHP Math Reference PHP Math Reference

COLOR PICKER

colorpicker

SHARE THIS PAGE






Search w3schools.com:

Translate w3schools.com: