☰
Debian Codegraph
@
0.12.0-1
0.10.0-1
/
/
debian
/
rust-vendor
/
libm
/
src
/
math
/
generic
/
fabs.rs
☽
☼
debian/rust-vendor/libm/src/math/generic/fabs.rs
code
plain
raw
MIT
or
Apache-2.0
the respective crate authors
debian/copyright
1
use crate::support::Float;
2
3
/// Absolute value.
4
#[inline]
5
pub fn fabs<F: Float>(x: F) -> F {
6
let abs_mask = !F::SIGN_MASK;
7
F::from_bits(x.to_bits() & abs_mask)
8
}