X is the angular value in radian. We get output as TANGENT of the input value.
echo TAN(PI()); // Output is  0 
echo "<br>";
echo TAN(PI()/2); // Output  is infinity 
echo "<br>";
echo ROUND(TAN(PI()/3),2); // Output is 1.73
echo "<br>";
echo TAN(PI()/4); // Output is 1 

deg2rad() with TAN()

We can use deg2rad() to convert Degree value to radian and then use TAN().
echo TAN(deg2rad(0)); // Output  is 0
echo "<br>";
echo TAN(deg2rad(90)); // Output is 1.6331239353195E+16  // same as infinity 
echo "<br>";
echo TAN(deg2rad(180)); // Output  is -1.2246467991474E-16//  same as 0

Plotting of SIN & SIN curves by using PHP GD function with deg2rad()

Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net


    Post your comments , suggestion , error , requirements etc here .

    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2022 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer