Skip to main content

builtin_hypot

Function builtin_hypot 

Source
fn builtin_hypot(
    args: &[RValue],
    _: &[(String, RValue)],
) -> Result<RValue, RError>
Expand description

Euclidean distance: sqrt(x^2 + y^2) without overflow.

Computes the hypotenuse length avoiding intermediate overflow that would occur with naive sqrt(xx + yy).

@param x numeric vector @param y numeric vector @return numeric vector of hypotenuse lengths