|
|
Tutorials » Php »
|
Topic |
What is hypot Function?
Calculate hypotenuse lenth of a right-angle triangle.
|
|
Explanation |
|
The "hypot()" function is used to calculate the length of the hypotenuse of a right-angle triangle.
Syntax:
hypot(x,y)
In the above syntax "x", "y" are the coordinates of a triangle, whose hypotenuse has to be calculated.
Example:
<?php
echo hypot(3,6). "<br /;>";
echo hypot(1,3);
?>
Result:
6.7082039325
3.16227766017
In the above example the length of the hypotenuse of two right angled triangles are calculated.
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|