pub fn normalize_angle(angle: f64) -> f64Expand description
Wraps angle [rad] into [-π, π].
Angles already in range (including both ends) come back unchanged, and any other finite angle is reduced with one exact remainder, so the result matches the classic “subtract 2π while above π” loop without its unbounded running time. Non-finite input is returned as is.