• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

PHP atan function – Arc tangent

by admin

Description

The atan() function calculates the arc tangent value of the number provided as its only parameter, essentially reversing the operation of tan(). The return value is in radians—you should use the rad2deg() to convert radians to degrees.

Syntax:

asin(float $num): float

Parameters

Parameter Description
num The argument to process.

Return Values

Returns the calculated arctangent for the given argument in radians.

Examples

Example 1:

$tan = 10.0; 
echo "The arctangent of $tan is ", atan($tan);

Example 2:

$atan1 = atan(0.4346);
$atan2 = atan(tan(80));

Filed Under: PHP

Some more articles you might also be interested in …

  1. PHP Function str_split() – Convert a string to an array
  2. PHP function abs – Absolute value
  3. PHP function stripcslashes() – Un-quote string quoted with addcslashes()
  4. PHP function acos – Arc cosine
  5. PHP Function strchr() – Alias of strstr()
  6. PHP function str_ireplace() – Case-insensitive version of str_replace()
  7. htaccess Cheatsheet
  8. PHP connection_status function – Returns connection status bitfield
  9. PHP bindec function – Convert a number between arbitrary bases
  10. PHP function str_replace() – Replace all occurrences of the search string with the replacement string

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright