1
2
3
4
5
6
7
8
9
use crate::math::Real;

pub fn inv(val: Real) -> Real {
    if val == 0.0 {
        0.0
    } else {
        1.0 / val
    }
}