File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,38 @@ impl<T: Float> DerefMut for OrderedFloat<T> {
160160
161161impl < T : Float > Eq for OrderedFloat < T > { }
162162
163+ impl < T : Float > Add for OrderedFloat < T > {
164+ type Output = Self ;
165+
166+ fn add ( self , other : Self ) -> Self {
167+ OrderedFloat ( self . 0 + other. 0 )
168+ }
169+ }
170+
171+ impl < T : Float > Sub for OrderedFloat < T > {
172+ type Output = Self ;
173+
174+ fn sub ( self , other : Self ) -> Self {
175+ OrderedFloat ( self . 0 - other. 0 )
176+ }
177+ }
178+
179+ impl < T : Float > Mul for OrderedFloat < T > {
180+ type Output = Self ;
181+
182+ fn mul ( self , other : Self ) -> Self {
183+ OrderedFloat ( self . 0 * other. 0 )
184+ }
185+ }
186+
187+ impl < T : Float > Div for OrderedFloat < T > {
188+ type Output = Self ;
189+
190+ fn div ( self , other : Self ) -> Self {
191+ OrderedFloat ( self . 0 / other. 0 )
192+ }
193+ }
194+
163195impl < T : Float > Bounded for OrderedFloat < T > {
164196 fn min_value ( ) -> Self {
165197 OrderedFloat ( T :: min_value ( ) )
You can’t perform that action at this time.
0 commit comments