bevy_math::ops

Function hypot

Source
pub fn hypot(x: f32, y: f32) -> f32
Available on non-crate feature libm only.
Expand description

Compute the distance between the origin and a point (x, y) on the Euclidean plane. Equivalently, compute the length of the hypotenuse of a right-angle triangle with other sides having length x.abs() and y.abs().

Precision is specified when the libm feature is enabled.