1use crate::math::Real; 2 3pub fn inv(val: Real) -> Real { 4 if val == 0.0 { 5 0.0 6 } else { 7 1.0 / val 8 } 9}