Skip to main content

hypot

Function hypot 

Source
pub fn hypot<F: Float, N: Size>(
    lhs: Vector<F, N>,
    rhs: Vector<F, N>,
) -> Vector<F, N>
Expand description

Computes the hypotenuse of a right triangle given the lengths of the other two sides.

This function computes sqrt(x² + y²) in a numerically stable way that avoids overflow and underflow issues.