about summary refs log tree commit diff
path: root/library/compiler-builtins/libm/src/math/generic/fdim.rs
blob: a63007b191ccaf87584eb5f00ba6f07150a704ec (plain)
1
2
3
4
5
6
use super::super::Float;

#[inline]
pub fn fdim<F: Float>(x: F, y: F) -> F {
    if x <= y { F::ZERO } else { x - y }
}