From 826fff7dfe702df17a35466be4ac0e1b94f0354f Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Wed, 7 Apr 2021 22:17:38 +0200 Subject: [PATCH] fix README link --- README.md | 14 +++++++------- src/lib.rs | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 553445f..e00ecae 100644 --- a/README.md +++ b/README.md @@ -17,19 +17,19 @@ The [*fixed* crate] provides fixed-point numbers. These types can have f = `Frac` fractional bits, where 0 ≤ f ≤ n and n is the total number of bits. For -example, [`FixedI32`] is a 32-bit signed fixed-point number with -n = 32. The value x can lie in the range +example, [`FixedI32`][`FixedI32`] is a 32-bit signed fixed-point +number with n = 32. The value x can lie in the range −2n − f − 1 ≤ x < 2n − f − 1 for signed numbers, and in the range -0 ≤ x < 2n − f for unsigned numbers. The -difference between successive numbers is constant throughout the +0 ≤ x < 2n − f for unsigned numbers. +The difference between successive numbers is constant throughout the range: Δ = 2f. When f = 0, Δ = 1 and the fixed-point number behaves like an n-bit integer with the value lying in the range -−2n − 1 ≤ x < 2n − 1 for signed -numbers, and in the range 0 ≤ x < 2n for -unsigned numbers. When f = n, +−2n − 1 ≤ x < 2n − 1 for +signed numbers, and in the range 0 ≤ x < 2n +for unsigned numbers. When f = n, Δ = 2n and the value lies in the range −0.5 ≤ x < 0.5 for signed numbers, and in the range 0 ≤ x < 1 for unsigned numbers. diff --git a/src/lib.rs b/src/lib.rs index e1b8395..b1e3c72 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,19 +26,19 @@ The [*fixed* crate] provides fixed-point numbers. These types can have f = `Frac` fractional bits, where 0 ≤ f ≤ n and n is the total number of bits. For -example, [`FixedI32`] is a 32-bit signed fixed-point number with -n = 32. The value x can lie in the range +example, [`FixedI32`][`FixedI32`] is a 32-bit signed fixed-point +number with n = 32. The value x can lie in the range −2n − f − 1 ≤ x < 2n − f − 1 for signed numbers, and in the range -0 ≤ x < 2n − f for unsigned numbers. The -difference between successive numbers is constant throughout the +0 ≤ x < 2n − f for unsigned numbers. +The difference between successive numbers is constant throughout the range: Δ = 2f. When f = 0, Δ = 1 and the fixed-point number behaves like an n-bit integer with the value lying in the range -−2n − 1 ≤ x < 2n − 1 for signed -numbers, and in the range 0 ≤ x < 2n for -unsigned numbers. When f = n, +−2n − 1 ≤ x < 2n − 1 for +signed numbers, and in the range 0 ≤ x < 2n +for unsigned numbers. When f = n, Δ = 2n and the value lies in the range −0.5 ≤ x < 0.5 for signed numbers, and in the range 0 ≤ x < 1 for unsigned numbers.