fn wrap_pi(v: f64) -> f64Expand description
Wrap a value already known to lie within ±3π into [-π, π].
Matches the reference’s wrap(), which is a single conditional rather than a
general modulo. Every argument here is a difference of two wrapped phases, so
its magnitude is at most 2π and one correction always suffices.