move a chunk of the README into CONTRIBUTING.md
This commit is contained in:
@@ -355,7 +355,7 @@ impl F32Ext for f32 {
|
||||
}
|
||||
}
|
||||
|
||||
/// Math support for `f32`
|
||||
/// Math support for `f64`
|
||||
///
|
||||
/// This trait is sealed and cannot be implemented outside of `libm`.
|
||||
pub trait F64Ext: private::Sealed {
|
||||
|
||||
@@ -22,3 +22,11 @@ pub fn trunc(x: f64) -> f64 {
|
||||
i &= !m;
|
||||
f64::from_bits(i)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn sanity_check() {
|
||||
assert_eq!(super::trunc(1.1), 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,3 +22,11 @@ pub fn truncf(x: f32) -> f32 {
|
||||
i &= !m;
|
||||
f32::from_bits(i)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn sanity_check() {
|
||||
assert_eq!(super::truncf(1.1), 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user