pub fn safe_div(num: f64, denom: f64, fallback: f64) -> f64Expand description
Safe division that returns fallback when the denominator is too small to
produce a meaningful result (within 1e-9). Use this for any calculation
where a zero-or-near-zero duration could otherwise produce NaN/∞ that
silently propagates into transforms or opacity.