link tuple in docs

This commit is contained in:
Trevor Spiteri 2019-08-06 22:43:02 +02:00
parent 4f1a9b3bd3
commit 5bffc02836
4 changed files with 76 additions and 41 deletions

View File

@ -802,7 +802,7 @@ assert_eq!(Fix::min_value().wrapping_abs(), Fix::min_value());
comment!(
"Overflowing negation.
Returns a tuple of the negated value and a [`bool`] indicating whether
Returns a [tuple] of the negated value and a [`bool`] indicating whether
an overflow has occurred. On overflow, the wrapped value is returned.
",
@ -833,6 +833,7 @@ assert_eq!(Fix::from_int(5).overflowing_neg(), (Fix::from_bits(neg_five_bits), t
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_neg(self) -> ($Fixed<Frac>, bool) {
@ -844,7 +845,7 @@ assert_eq!(Fix::from_int(5).overflowing_neg(), (Fix::from_bits(neg_five_bits), t
comment!(
"Overflowing addition.
Returns a tuple of the sum and a [`bool`] indicating whether an
Returns a [tuple] of the sum and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
# Examples
@ -862,6 +863,7 @@ assert_eq!(Fix::max_value().overflowing_add(one), (",
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_add(self, rhs: $Fixed<Frac>) -> ($Fixed<Frac>, bool) {
@ -873,7 +875,7 @@ assert_eq!(Fix::max_value().overflowing_add(one), (",
comment!(
"Overflowing subtraction.
Returns a tuple of the difference and a [`bool`] indicating whether an
Returns a [tuple] of the difference and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
# Examples
@ -896,6 +898,7 @@ assert_eq!(Fix::from_int(0)",
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_sub(self, rhs: $Fixed<Frac>) -> ($Fixed<Frac>, bool) {
@ -907,7 +910,7 @@ assert_eq!(Fix::from_int(0)",
comment!(
"Overflowing multiplication.
Returns a tuple of the product and a [`bool`] indicating whether an
Returns a [tuple] of the product and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
# Examples
@ -922,6 +925,7 @@ assert_eq!(Fix::max_value().overflowing_mul(Fix::from_int(4)), (wrapped, true));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_mul(self, rhs: $Fixed<Frac>) -> ($Fixed<Frac>, bool) {
@ -933,7 +937,7 @@ assert_eq!(Fix::max_value().overflowing_mul(Fix::from_int(4)), (wrapped, true));
comment!(
"Overflowing division.
Returns a tuple of the quotient and a [`bool`] indicating whether an
Returns a [tuple] of the quotient and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
# Panics
@ -963,7 +967,7 @@ assert_eq!(Fix::max_value().overflowing_div(quarter), (wrapped, true));
comment!(
"Overflowing multiplication by an integer.
Returns a tuple of the product and a [`bool`] indicating whether an
Returns a [tuple] of the product and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
# Examples
@ -978,6 +982,7 @@ assert_eq!(Fix::max_value().overflowing_mul_int(4), (wrapped, true));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_mul_int(self, rhs: $Inner) -> ($Fixed<Frac>, bool) {
@ -989,7 +994,7 @@ assert_eq!(Fix::max_value().overflowing_mul_int(4), (wrapped, true));
comment!(
"Overflowing division by an integer.
Returns a tuple of the quotient and ",
Returns a [tuple] of the quotient and ",
if_signed_unsigned!(
$Signedness,
"a [`bool`] indicating whether an overflow has
@ -1021,6 +1026,7 @@ assert_eq!(Fix::from_int(3).overflowing_div_int(2), (one_point_5, false));
"```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_div_int(self, rhs: $Inner) -> ($Fixed<Frac>, bool) {
@ -1032,7 +1038,7 @@ assert_eq!(Fix::from_int(3).overflowing_div_int(2), (one_point_5, false));
comment!(
"Overflowing fixed-point remainder for division by an integer.
Returns a tuple of the remainder and ",
Returns a [tuple] of the remainder and ",
if_signed_unsigned!(
$Signedness,
"a [`bool`] indicating whether an overflow has
@ -1063,6 +1069,7 @@ assert_eq!(Fix::from_bits(0b10101).overflowing_rem_int(8), (Fix::from_bits(0b101
"```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_rem_int(self, rhs: $Inner) -> ($Fixed<Frac>, bool) {
@ -1074,7 +1081,7 @@ assert_eq!(Fix::from_bits(0b10101).overflowing_rem_int(8), (Fix::from_bits(0b101
comment!(
"Overflowing shift left.
Returns a tuple of the shifted value and a [`bool`] indicating whether
Returns a [tuple] of the shifted value and a [`bool`] indicating whether
an overflow has occurred. Overflow occurs when `rhs` ",
$s_nbits,
". On overflow `rhs` is wrapped before the shift operation.
@ -1092,6 +1099,7 @@ assert_eq!((Fix::from_int(1) / 2).overflowing_shl(3 + ",
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_shl(self, rhs: u32) -> ($Fixed<Frac>, bool) {
@ -1103,7 +1111,7 @@ assert_eq!((Fix::from_int(1) / 2).overflowing_shl(3 + ",
comment!(
"Overflowing shift right.
Returns a tuple of the shifted value and a [`bool`] indicating whether
Returns a [tuple] of the shifted value and a [`bool`] indicating whether
an overflow has occurred. Overflow occurs when `rhs` ",
$s_nbits,
". On overflow `rhs` is wrapped before the shift operation.
@ -1121,6 +1129,7 @@ assert_eq!((Fix::from_int(4)).overflowing_shr(3 + ",
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_shr(self, rhs: u32) -> ($Fixed<Frac>, bool) {
@ -1134,7 +1143,7 @@ assert_eq!((Fix::from_int(4)).overflowing_shr(3 + ",
comment!(
"Overflowing absolute value.
Returns a tuple of the absolute value and a [`bool`] indicating
Returns a [tuple] of the absolute value and a [`bool`] indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -1151,6 +1160,7 @@ assert_eq!(Fix::min_value().overflowing_abs(), (Fix::min_value(), true));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_abs(self) -> ($Fixed<Frac>, bool) {

View File

@ -1042,7 +1042,7 @@ assert_eq!(Fix::wrapping_from_float(large), wrapped);
"Creates a fixed-point number from another fixed-point
number.
Returns a tuple of the fixed-point number and a [`bool`] indicating
Returns a [tuple] of the fixed-point number and a [`bool`] indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -1074,6 +1074,7 @@ assert_eq!(Dst::overflowing_from_fixed(too_large), (wrapped, true));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_from_fixed<F>(val: F) -> ($Fixed<Frac>, bool)
@ -1088,7 +1089,7 @@ assert_eq!(Dst::overflowing_from_fixed(too_large), (wrapped, true));
"Converts a fixed-point number to another fixed-point
number.
Returns a tuple of the fixed-point number and a [`bool`] indicating
Returns a [tuple] of the fixed-point number and a [`bool`] indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -1124,7 +1125,7 @@ assert_eq!(Src::max_value().overflowing_to_fixed::<TooFewIntBits>(), (wrapped, t
comment!(
"Creates a fixed-point number from an integer.
Returns a tuple of the fixed-point number and a [`bool`] indicating
Returns a [tuple] of the fixed-point number and a [`bool`] indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -1166,6 +1167,7 @@ assert_eq!(Fix::overflowing_from_int(large), (wrapped, true));
[`u64`]: https://doc.rust-lang.org/nightly/std/primitive.u64.html
[`u8`]: https://doc.rust-lang.org/nightly/std/primitive.u8.html
[`usize`]: https://doc.rust-lang.org/nightly/std/primitive.usize.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_from_int<I>(val: I) -> ($Fixed<Frac>, bool)
@ -1179,7 +1181,7 @@ assert_eq!(Fix::overflowing_from_int(large), (wrapped, true));
comment!(
"Converts a fixed-point number to an integer.
Returns a tuple of the integer and a [`bool`] indicating whether an
Returns a [tuple] of the integer and a [`bool`] indicating whether an
overflow has occurred. On overflow, the wrapped value is returned.
The integer can be of type [`i8`], [`i16`], [`i32`], [`i64`],
@ -1234,6 +1236,7 @@ assert_eq!(does_not_fit.overflowing_to_int::<",
[`u64`]: https://doc.rust-lang.org/nightly/std/primitive.u64.html
[`u8`]: https://doc.rust-lang.org/nightly/std/primitive.u8.html
[`usize`]: https://doc.rust-lang.org/nightly/std/primitive.usize.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_to_int<I>(self) -> (I, bool)
@ -1248,7 +1251,7 @@ assert_eq!(does_not_fit.overflowing_to_int::<",
"Creates a fixed-point number from a floating-point
number.
Returns a tuple of the fixed-point number and a [`bool`] indicating whether
Returns a [tuple] of the fixed-point number and a [`bool`] indicating whether
an overflow has occurred. On overflow, the wrapped value is returned.
The floating-point value can be of type [`f32`] or [`f64`].
@ -1290,6 +1293,7 @@ assert_eq!(Fix::overflowing_from_float(large), (wrapped, true));
[`f32`]: https://doc.rust-lang.org/nightly/std/primitive.f32.html
[`f64`]: https://doc.rust-lang.org/nightly/std/primitive.f64.html
[finite]: https://doc.rust-lang.org/nightly/std/primitive.f64.html#method.is_finite
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_from_float<F>(val: F) -> ($Fixed<Frac>, bool)

View File

@ -73,7 +73,7 @@ numbers, except in the case where there are no integer bits, that is `",
$s_fixed,
"<U",
$s_nbits,
">` where the return value is always equal to
">` where the return value is always equal to
`self`.
",
@ -532,7 +532,7 @@ assert_eq!(two_half.wrapping_round(), Fix::from_int(3));
comment!(
"Overflowing ceil. Rounds to the next integer towards +∞.
Returns a tuple of the fixed-point number and a [`bool`], indicating
Returns a [tuple] of the fixed-point number and a [`bool`], indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -554,6 +554,7 @@ assert_eq!(two_half.overflowing_ceil(), (Fix::from_int(3), false));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_ceil(self) -> ($Fixed<Frac>, bool) {
@ -579,15 +580,14 @@ assert_eq!(two_half.overflowing_ceil(), (Fix::from_int(3), false));
comment!(
"Overflowing floor. Rounds to the next integer towards −∞.
Returns a [tuple] of the fixed-point number and
",
if_signed_unsigned!(
$Signedness,
"Returns a tuple of the fixed-point number and a
[`bool`], indicating whether an overflow has occurred. On overflow,
the wrapped value isreturned. Overflow can only occur when there are
zero integer bits.",
"Returns a tuple of the fixed-point number and
[`false`][`bool`].",
"a [`bool`], indicating whether an overflow has
occurred. On overflow, the wrapped value isreturned. Overflow can only
occur when there are zero integer bits.",
"[`false`][`bool`].",
),
"
@ -614,6 +614,7 @@ assert_eq!(AllFrac::min_value().overflowing_floor(), (AllFrac::from_int(0), true
"```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_floor(self) -> ($Fixed<Frac>, bool) {
@ -632,7 +633,7 @@ assert_eq!(AllFrac::min_value().overflowing_floor(), (AllFrac::from_int(0), true
"Overflowing round. Rounds to the next integer to the
nearest, with ties rounded away from zero.
Returns a tuple of the fixed-point number and a [`bool`] indicating
Returns a [tuple] of the fixed-point number and a [`bool`] indicating
whether an overflow has occurred. On overflow, the wrapped value is
returned.
@ -654,6 +655,7 @@ assert_eq!(two_half.overflowing_round(), (Fix::from_int(3), false));
```
[`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
[tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
";
#[inline]
pub fn overflowing_round(self) -> ($Fixed<Frac>, bool) {

View File

@ -110,30 +110,33 @@ pub trait Fixed: Copy + FromFixed + ToFixed + sealed::Fixed {
/// Overflowing ceil. Rounds to the next integer towards +∞.
///
/// Returns a tuple of the fixed-point number and a [`bool`],
/// Returns a [tuple] of the fixed-point number and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_ceil(self) -> (Self, bool);
/// Overflowing floor. Rounds to the next integer towards −∞.
///
/// Returns a tuple of the fixed-point number and a [`bool`],
/// Returns a [tuple] of the fixed-point number and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_floor(self) -> (Self, bool);
/// Overflowing round. Rounds to the next integer to the nearest,
/// with ties rounded away from zero.
///
/// Returns a tuple of the fixed-point number and a [`bool`],
/// Returns a [tuple] of the fixed-point number and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_round(self) -> (Self, bool);
/// Returns the number of ones in the binary representation.
@ -285,43 +288,47 @@ pub trait Fixed: Copy + FromFixed + ToFixed + sealed::Fixed {
/// Overflowing negation.
///
/// Returns a tuple of the negated value and a [`bool`],
/// Returns a [tuple] of the negated value and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_neg(self) -> (Self, bool);
/// Overflowing addition.
///
/// Returns a tuple of the sum and a [`bool`], indicating whether
/// Returns a [tuple] of the sum and a [`bool`], indicating whether
/// an overflow has occurred. On overflow, the wrapped value is
/// returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_add(self, rhs: Self) -> (Self, bool);
/// Overflowing subtraction.
///
/// Returns a tuple of the difference and a [`bool`], indicating
/// Returns a [tuple] of the difference and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_sub(self, rhs: Self) -> (Self, bool);
/// Overflowing multiplication.
///
/// Returns a tuple of the product and a [`bool`], indicating
/// Returns a [tuple] of the product and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_mul(self, rhs: Self) -> (Self, bool);
/// Overflowing division.
///
/// Returns a tuple of the quotient and a [`bool`], indicating
/// Returns a [tuple] of the quotient and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned.
///
@ -330,20 +337,22 @@ pub trait Fixed: Copy + FromFixed + ToFixed + sealed::Fixed {
/// Panics if the divisor is zero.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_div(self, rhs: Self) -> (Self, bool);
/// Overflowing multiplication by an integer.
///
/// Returns a tuple of the product and a [`bool`], indicating
/// Returns a [tuple] of the product and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_mul_int(self, rhs: Self::Bits) -> (Self, bool);
/// Overflowing division by an integer.
///
/// Returns a tuple of the quotient and a [`bool`], indicating
/// Returns a [tuple] of the quotient and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned.
///
@ -352,11 +361,12 @@ pub trait Fixed: Copy + FromFixed + ToFixed + sealed::Fixed {
/// Panics if the divisor is zero.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_div_int(self, rhs: Self::Bits) -> (Self, bool);
/// Overflowing fixed-point remainder for division by an integer.
///
/// Returns a tuple of the remainder and a [`bool`], indicating
/// Returns a [tuple] of the remainder and a [`bool`], indicating
/// whether an overflow has occurred. On overflow, the wrapped
/// value is returned. Overflow can only occur when dividing the
/// minimum value by 1.
@ -366,24 +376,27 @@ pub trait Fixed: Copy + FromFixed + ToFixed + sealed::Fixed {
/// Panics if the divisor is zero.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_rem_int(self, rhs: Self::Bits) -> (Self, bool);
/// Overflowing shift left.
///
/// Returns a tuple of the shifted value and a [`bool`],
/// Returns a [tuple] of the shifted value and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_shl(self, rhs: u32) -> (Self, bool);
/// Overflowing shift right.
///
/// Returns a tuple of the shifted value and a [`bool`],
/// Returns a [tuple] of the shifted value and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_shr(self, rhs: u32) -> (Self, bool);
}
@ -428,21 +441,24 @@ pub trait FixedSigned: Fixed {
/// Overflowing absolute value.
///
/// Returns a tuple of the fixed-point number and a [`bool`],
/// Returns a [tuple] of the fixed-point number and a [`bool`],
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_abs(self) -> (Self, bool);
/// Returns [`true`][`bool`] if the number is > 0.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn is_positive(self) -> bool;
/// Returns [`true`][`bool`] if the number is < 0.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn is_negative(self) -> bool;
}
@ -452,6 +468,7 @@ pub trait FixedUnsigned: Fixed {
/// 2<sup><i>k</i></sup> for some integer <i>k</i>.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn is_power_of_two(self) -> bool;
/// Returns the smallest power of two ≥ `self`.
@ -584,13 +601,14 @@ pub trait FromFixed {
/// Converts from a fixed-point number.
///
/// Returns a tuple of the value and a [`bool`] indicating whether
/// Returns a [tuple] of the value and a [`bool`] indicating whether
/// an overflow has occurred. On overflow, the wrapped value is
/// returned.
///
/// Any extra fractional bits are truncated.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_from_fixed<F>(val: F) -> (Self, bool)
where
F: sealed::Fixed,
@ -663,13 +681,14 @@ pub trait ToFixed {
/// Converts from a fixed-point number.
///
/// Returns a tuple of the fixed-point number and a [`bool`]
/// Returns a [tuple] of the fixed-point number and a [`bool`]
/// indicating whether an overflow has occurred. On overflow, the
/// wrapped value is returned.
///
/// Any extra fractional bits are truncated.
///
/// [`bool`]: https://doc.rust-lang.org/nightly/std/primitive.bool.html
/// [tuple]: https://doc.rust-lang.org/nightly/std/primitive.tuple.html
fn overflowing_to_fixed<F>(self) -> (F, bool)
where
F: sealed::Fixed;