Skip to content

Commit c1db18b

Browse files
author
Maxim Samburskiy
committed
Fix f32::sin_cos and f64::sin_cos examples
1 parent fef6c64 commit c1db18b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libstd/num/f32.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ impl f32 {
10301030
/// let abs_difference_1 = (f.1 - x.cos()).abs();
10311031
///
10321032
/// assert!(abs_difference_0 <= f32::EPSILON);
1033-
/// assert!(abs_difference_0 <= f32::EPSILON);
1033+
/// assert!(abs_difference_1 <= f32::EPSILON);
10341034
/// ```
10351035
#[stable(feature = "rust1", since = "1.0.0")]
10361036
#[inline]

src/libstd/num/f64.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ impl f64 {
903903
/// let abs_difference_1 = (f.1 - x.cos()).abs();
904904
///
905905
/// assert!(abs_difference_0 < 1e-10);
906-
/// assert!(abs_difference_0 < 1e-10);
906+
/// assert!(abs_difference_1 < 1e-10);
907907
/// ```
908908
#[stable(feature = "rust1", since = "1.0.0")]
909909
#[inline]

0 commit comments

Comments
 (0)