Skip to main content

rhypot

Function rhypot 

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

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

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