File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 05e7ba8d397274a3ab7f621b0a1e84ca27f0c219
2
+ refs/heads/master: 28ecef7bf5c25439a565a000fe9acad1463a05c7
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: eb8fd119c65c67f3b1b8268cc7341c22d39b7b61
5
5
refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
Original file line number Diff line number Diff line change @@ -138,6 +138,18 @@ pub pure fn logarithm(n: f32, b: f32) -> f32 {
138
138
return log2 ( n) / log2 ( b) ;
139
139
}
140
140
141
+ impl f32 : cmp:: Eq {
142
+ pure fn eq ( & self , other : & f32 ) -> bool { ( * self ) == ( * other) }
143
+ pure fn ne ( & self , other : & f32 ) -> bool { ( * self ) != ( * other) }
144
+ }
145
+
146
+ impl f32 : cmp:: Ord {
147
+ pure fn lt ( & self , other : & f32 ) -> bool { ( * self ) < ( * other) }
148
+ pure fn le ( & self , other : & f32 ) -> bool { ( * self ) <= ( * other) }
149
+ pure fn ge ( & self , other : & f32 ) -> bool { ( * self ) >= ( * other) }
150
+ pure fn gt ( & self , other : & f32 ) -> bool { ( * self ) > ( * other) }
151
+ }
152
+
141
153
impl f32 : num:: Num {
142
154
pure fn add ( other : & f32 ) -> f32 { return self + * other; }
143
155
pure fn sub ( other : & f32 ) -> f32 { return self - * other; }
Original file line number Diff line number Diff line change @@ -157,6 +157,18 @@ pub pure fn logarithm(n: f64, b: f64) -> f64 {
157
157
return log2 ( n) / log2 ( b) ;
158
158
}
159
159
160
+ impl f64 : cmp:: Eq {
161
+ pure fn eq ( & self , other : & f64 ) -> bool { ( * self ) == ( * other) }
162
+ pure fn ne ( & self , other : & f64 ) -> bool { ( * self ) != ( * other) }
163
+ }
164
+
165
+ impl f64 : cmp:: Ord {
166
+ pure fn lt ( & self , other : & f64 ) -> bool { ( * self ) < ( * other) }
167
+ pure fn le ( & self , other : & f64 ) -> bool { ( * self ) <= ( * other) }
168
+ pure fn ge ( & self , other : & f64 ) -> bool { ( * self ) >= ( * other) }
169
+ pure fn gt ( & self , other : & f64 ) -> bool { ( * self ) > ( * other) }
170
+ }
171
+
160
172
impl f64 : num:: Num {
161
173
pure fn add ( other : & f64 ) -> f64 { return self + * other; }
162
174
pure fn sub ( other : & f64 ) -> f64 { return self - * other; }
You can’t perform that action at this time.
0 commit comments