Return the cosine of different numbers in PHP

Description

The following code shows how to return the cosine of different numbers.

Example


  // w  w w .j  a  va2 s  . c om
<?php
    echo(cos(3) . "<br>");
    echo(cos(-3) . "<br>");
    echo(cos(0) . "<br>");
    echo(cos(M_PI) . "<br>");
    echo(cos(2*M_PI));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions