nyx_space::utils

Function between_0_360

Source
pub fn between_0_360(angle: f64) -> f64
Expand description

Returns the provided angle bounded between 0.0 and 360.0.

This function takes an angle (in degrees) and normalizes it to the range [0, 360). If the angle is negative, it will be converted to a positive angle in the equivalent position. For example, an angle of -90 degrees will be converted to 270 degrees.

ยงArguments

  • angle - An angle in degrees.