![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
hypot() function in PHP
The hypot() function is used to calculate the hypotenuse of a right-angle triangle. It Returns the length of the hypotenuse in float. Of a right-angled triangle, the longest side is hypotenuse.
Syntax
hypot(a, b)
Parameters
a − Length of first side
b − Length of second side
Return
The hypot() function Returns the length of the hypotenuse in float.
Example
<?php echo hypot(2,8) . "<br>"; echo hypot(8,3); ?>
Output
8.2462112512353<br>8.5440037453175
Advertisements