Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
knoellle committed Nov 15, 2024
1 parent 5d0a073 commit 376a366
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/hulk_behavior_simulator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use interfake::FakeDataInterface;
pub mod autoref;
pub mod ball;
pub mod fake_data;
pub mod field_dimensions;
pub mod game_controller;
pub mod interfake;
pub mod recorder;
Expand All @@ -14,7 +15,6 @@ pub mod scenario;
pub mod server;
pub mod simulator;
pub mod time;
pub mod field_dimensions;
pub mod whistle;

include!(concat!(env!("OUT_DIR"), "/generated_code.rs"));
Expand Down
3 changes: 1 addition & 2 deletions crates/types/src/field_dimensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ impl FieldDimensions {
}

pub fn is_inside_any_goal(&self, position: Point2<Field>) -> bool {
position.x().abs() > self.length / 2.0
&& position.y().abs() < self.goal_inner_width / 2.0
position.x().abs() > self.length / 2.0 && position.y().abs() < self.goal_inner_width / 2.0
}

pub fn penalty_spot(&self, half: Half) -> Point2<Field> {
Expand Down
17 changes: 7 additions & 10 deletions tools/twix/src/panels/behavior_simulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,13 @@ impl Widget for &mut BehaviorSimulatorPanel {
);
};

ui.with_layout(
Layout::right_to_left(Align::Min),
|ui| {
ui.add(
Slider::new(&mut self.playback_speed, -10.0..=10.0)
.step_by(0.1)
.text("Playback Speed"),
)
},
);
ui.with_layout(Layout::right_to_left(Align::Min), |ui| {
ui.add(
Slider::new(&mut self.playback_speed, -10.0..=10.0)
.step_by(0.1)
.text("Playback Speed"),
)
});
});
ui.checkbox(&mut self.playing, "Play")
})
Expand Down

0 comments on commit 376a366

Please sign in to comment.