atan():

<?Php
echo atan(0); // Output is 0
echo "<br>";
echo atan(1); // Output  0.78539816339745
echo "<br>";
echo atan(-1); // -0.78539816339745
echo "<br>";
echo atan(4); // Output is 1.325817663668
echo "<br>";
echo atan(2); // Output is 1.1071487177941
echo "<br>";
echo atan(90); // Output is 1.5596856728973
?>
atan(X);
X is the angular value in radian. We get output as ARC tangent of the input angle.

deg2rad() with atan()

We can use deg2rad() to convert Degree value to radian and then use atan().
<?Php
echo atan(deg2rad(45)); // Output 0.66577375002835
echo "<br>";
echo atan(deg2rad(90)); // Output 1.0038848218539
echo "<br>";
echo atan(deg2rad(180)); // Output 1.2626272556789
echo "<br>";
echo atan(deg2rad(1)); // Output 0.017451520651466
echo "<br>";
echo atan(deg2rad(-1)); // Output -0.017451520651466
echo "<br>";
echo atan(deg2rad(-4)); // Output -0.069700080299613
echo "<br>";
echo atan(deg2rad(-90)); // Output -1.0038848218539
echo "<br>";
echo atan(deg2rad(-180)); // Output -1.2626272556789
?>

Questions

MIN() function
Math Functions
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com







    Post your comments , suggestion , error , requirements etc here





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