File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,7 +222,10 @@ fn effect_builder_creates_rumble_with_direction() {
222222 match effect {
223223 Effect :: Rumble ( r) => {
224224 assert_eq ! ( r. duration, 2000 ) ;
225- assert_eq ! ( r. direction, ( 90.0 / 360.0 * 65535.0 ) . round( ) as u16 ) ;
225+ assert_eq ! (
226+ r. direction,
227+ ( ( 90.0f64 / 360.0f64 ) * 65535.0f64 ) as u16
228+ ) ;
226229 }
227230 _ => panic ! ( "Expected Rumble effect from builder" ) ,
228231 }
@@ -236,7 +239,10 @@ fn effect_builder_creates_periodic_effect() {
236239
237240 match effect {
238241 Effect :: Periodic ( p) => {
239- assert_eq ! ( p. direction, ( ( 180.0 / 360.0 ) * 65535.0 ) . round( ) as u16 ) ;
242+ assert_eq ! (
243+ p. direction,
244+ ( ( 180.0f64 / 360.0f64 ) * 65535.0f64 ) as u16
245+ ) ;
240246 assert ! ( matches!( p. waveform, PeriodicWaveform :: Sine ) ) ;
241247 }
242248 _ => panic ! ( "Expected Periodic effect from builder" ) ,
You can’t perform that action at this time.
0 commit comments