hypot: Calculates the hypotenuse of the arguments.

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Calculates the n dimensional hypotenuse of the arguments. It calculates the Euclidean norm of the arguments.

Usage

1

Arguments

...

Numeric vectors.

Details

The hypotenuse of a 2D triangle is given by h = sqrt(x^2 + y^2). In the n dimensional case, keep adding the terms...

Value

Numeric vector.

Examples

1
2
print(hypot(3, 4))
print(hypot(3,4,12))

tunelipt/wutils documentation built on Nov. 5, 2019, 11:01 a.m.