This commit is contained in:
Trevor Spiteri 2019-08-06 21:56:47 +02:00
parent b4baf7d15f
commit 4f1a9b3bd3
3 changed files with 5 additions and 5 deletions

View File

@ -44,7 +44,7 @@ numeric primitives are implemented. That is, you can use [`From`] or
* The [*fixed* crate] now requires rustc version 1.31.1 or later.
* The [`traits`] module was added, with its traits [`Fixed`],
[`FixedSigned`], [`FixedUnsigned`], [`FromFixed`], [`ToFixed`],
[`LossyFrom`] and [`LossyInto`],.
[`LossyFrom`] and [`LossyInto`].
* The [`saturating_neg`] method was added to all fixed-point
numbers, and the [`saturating_abs`] method was added to signed
fixed-point numbers.

View File

@ -22,9 +22,9 @@ number, and are rounded down at that precision.
# Examples
```rust
let pi: fixed::types::I8F8 = fixed::consts::PI.to_fixed();
println!("π with eight binary places is {:b}", pi);
assert_eq!(format!("{:b}", pi), "11.00100100");
let tau: fixed::types::I8F8 = fixed::consts::TAU.to_fixed();
println!("τ = 2π with eight binary places is {:b}", tau);
assert_eq!(format!("{:b}", tau), "110.01001000");
```
*/

View File

@ -233,7 +233,7 @@ use {
/// have to do so manually:
///
/// ```
/// ##[allow(unused_imports)]
/// # #[allow(unused_imports)]
/// use fixed::prelude::*;
/// ```
///