- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

hypot
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Numeric functions

Hypotenuse of the two inputs. More...

AFAPI array | hypot (const array &lhs, const array &rhs)
| C++ Interface for getting length of hypotenuse of two inputs. More...
AFAPI array | hypot (const array &lhs, const double rhs)
| C++ Interface for getting length of hypotenuse of two inputs. More...
AFAPI array | hypot (const double lhs, const array &rhs)
| C++ Interface for getting length of hypotenuse of two inputs. More...

## Detailed Description

Hypotenuse of the two inputs.

Note
  This function supports real inputs only. Complex inputs are not yet supported.

## Function Documentation

AFAPI array af::hypot | ( | const array & | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for getting length of hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or an array and a scalar.

Parameters

  [in] | lhs | is the length of first side
  [in] | rhs | is the length of second side

Returns
  the length of the hypotenuse

Examples:
  edge.cpp, and filters.cpp.

AFAPI array af::hypot | ( | const array & | lhs,
|  | const double | rhs
| ) |  |

C++ Interface for getting length of hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or an array and a scalar.

Parameters

  [in] | lhs | is the length of first side
  [in] | rhs | is the length of second side

Returns
  the length of the hypotenuse

AFAPI array af::hypot | ( | const double | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for getting length of hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or an array and a scalar.

Parameters

  [in] | lhs | is the length of first side
  [in] | rhs | is the length of second side

Returns
  the length of the hypotenuse