File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ impl f32 {
32
32
/// # Examples
33
33
///
34
34
/// ```
35
- /// let f = 3.99_f32 ;
35
+ /// let f = 3.7_f32 ;
36
36
/// let g = 3.0_f32;
37
+ /// let h = -3.7_f32;
37
38
///
38
39
/// assert_eq!(f.floor(), 3.0);
39
40
/// assert_eq!(g.floor(), 3.0);
41
+ /// assert_eq!(h.floor(), -4.0);
40
42
/// ```
41
43
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
42
44
#[ inline]
@@ -104,11 +106,13 @@ impl f32 {
104
106
/// # Examples
105
107
///
106
108
/// ```
107
- /// let f = 3.3_f32;
108
- /// let g = -3.7_f32;
109
+ /// let f = 3.7_f32;
110
+ /// let g = 3.0_f32;
111
+ /// let h = -3.7_f32;
109
112
///
110
113
/// assert_eq!(f.trunc(), 3.0);
111
- /// assert_eq!(g.trunc(), -3.0);
114
+ /// assert_eq!(g.trunc(), 3.0);
115
+ /// assert_eq!(h.trunc(), -3.0);
112
116
/// ```
113
117
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
114
118
#[ inline]
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ impl f64 {
32
32
/// # Examples
33
33
///
34
34
/// ```
35
- /// let f = 3.99_f64 ;
35
+ /// let f = 3.7_f64 ;
36
36
/// let g = 3.0_f64;
37
+ /// let h = -3.7_f64;
37
38
///
38
39
/// assert_eq!(f.floor(), 3.0);
39
40
/// assert_eq!(g.floor(), 3.0);
41
+ /// assert_eq!(h.floor(), -4.0);
40
42
/// ```
41
43
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
42
44
#[ inline]
@@ -84,11 +86,13 @@ impl f64 {
84
86
/// # Examples
85
87
///
86
88
/// ```
87
- /// let f = 3.3_f64;
88
- /// let g = -3.7_f64;
89
+ /// let f = 3.7_f64;
90
+ /// let g = 3.0_f64;
91
+ /// let h = -3.7_f64;
89
92
///
90
93
/// assert_eq!(f.trunc(), 3.0);
91
- /// assert_eq!(g.trunc(), -3.0);
94
+ /// assert_eq!(g.trunc(), 3.0);
95
+ /// assert_eq!(h.trunc(), -3.0);
92
96
/// ```
93
97
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
94
98
#[ inline]
You can’t perform that action at this time.
0 commit comments