Math Library Functions


hypot, hypotf


Syntax

#include <math.h>
double hypot(double x, double y);
float  hypotf(float x, float y);

Arguments

x      length of one side of the right angle in a right triangle
y      length of the other side of the right angle in a right triangle

Return Value

The length of the hypotenuse for the right triangle 

Description

Calculates the length of hypotenuse for a right triangle using the two right-angle sides, x and y.