From c1db18b54ef123b5db4e13ab00e682deff1a1e69 Mon Sep 17 00:00:00 2001 From: Maxim Samburskiy Date: Sat, 16 Apr 2016 11:42:37 +0500 Subject: [PATCH] Fix f32::sin_cos and f64::sin_cos examples --- src/libstd/num/f32.rs | 2 +- src/libstd/num/f64.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 6fc26bb7eed..624748f352e 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -1030,7 +1030,7 @@ impl f32 { /// let abs_difference_1 = (f.1 - x.cos()).abs(); /// /// assert!(abs_difference_0 <= f32::EPSILON); - /// assert!(abs_difference_0 <= f32::EPSILON); + /// assert!(abs_difference_1 <= f32::EPSILON); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[inline] diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 93e5969a275..6515301aefd 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -903,7 +903,7 @@ impl f64 { /// let abs_difference_1 = (f.1 - x.cos()).abs(); /// /// assert!(abs_difference_0 < 1e-10); - /// assert!(abs_difference_0 < 1e-10); + /// assert!(abs_difference_1 < 1e-10); /// ``` #[stable(feature = "rust1", since = "1.0.0")] #[inline]