Skip to content

Commit 8419761

Browse files
committed
Rollup merge of rust-lang#55328 - raphlinus:copysign_typo, r=joshtriplett
Fix doc for new copysign functions Thanks to \@LukasKalbertodt for catching this. Addresses a comment raised in rust-lang#55169 after it was merged.
2 parents d307d8a + 538f65e commit 8419761

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/libstd/f32.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ impl f32 {
198198
}
199199
}
200200

201-
/// Returns a number composed of the magnitude of one number and the sign of
202-
/// another.
201+
/// Returns a number composed of the magnitude of `self` and the sign of
202+
/// `y`.
203203
///
204204
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
205-
/// equal to `-y`. If `self` is a `NAN`, then a `NAN` with the sign of `y`
206-
/// is returned.
205+
/// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
206+
/// `y` is returned.
207207
///
208208
/// # Examples
209209
///

src/libstd/f64.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ impl f64 {
176176
}
177177
}
178178

179-
/// Returns a number composed of the magnitude of one number and the sign of
180-
/// another.
179+
/// Returns a number composed of the magnitude of `self` and the sign of
180+
/// `y`.
181181
///
182182
/// Equal to `self` if the sign of `self` and `y` are the same, otherwise
183-
/// equal to `-y`. If `self` is a `NAN`, then a `NAN` with the sign of `y`
184-
/// is returned.
183+
/// equal to `-self`. If `self` is a `NAN`, then a `NAN` with the sign of
184+
/// `y` is returned.
185185
///
186186
/// # Examples
187187
///

0 commit comments

Comments
 (0)