Skip to content

Commit

Permalink
Cargo fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac8668 committed Jan 21, 2024
1 parent ca78a01 commit 8ef04fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@ mod manager_api;
mod materials;
mod particles;
mod player;
mod rigidbody;
mod puffin_plugin;
mod rigidbody;
mod prelude {
pub use crate::{
actors::*, animation::*, atom::*, camera::*, chunk::*, chunk_group::*, chunk_manager::*,
consts::*, debug::*, geom_tools::*, manager_api::*, materials::*, particles::*, player::*,
rigidbody::*,
puffin_plugin::*,
puffin_plugin::*, rigidbody::*,
};
pub use bevy::input::mouse::MouseScrollUnit;
pub use bevy::input::mouse::MouseWheel;
Expand Down
6 changes: 3 additions & 3 deletions src/rigidbody.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn fill_rigidbodies(
.is_solid()
{
let angle = vec2(transform.rotation.z.cos(), transform.rotation.z.sin());
let mut pos = vec2(x as f32, y as f32).rotate(angle) + transform.translation.xy();
let pos = vec2(x as f32, y as f32).rotate(angle) + transform.translation.xy();
//pos.y *= -1.;

let chunk_pos = global_to_chunk(pos.as_ivec2());
Expand All @@ -94,8 +94,8 @@ pub fn unfill_rigidbodies(

for (transform, rigidbody) in &rigidbodies {
for (x, y) in (0..rigidbody.width).cartesian_product(0..rigidbody.height) {
let angle = vec2(-transform.rotation.z.cos(),- transform.rotation.z.sin());
let mut pos = vec2(x as f32, y as f32).rotate(angle) + transform.translation.xy();
let angle = vec2(-transform.rotation.z.cos(), -transform.rotation.z.sin());
let pos = vec2(x as f32, y as f32).rotate(angle) + transform.translation.xy();
//pos.y *= -1.;

let chunk_pos = global_to_chunk(pos.as_ivec2());
Expand Down

0 comments on commit 8ef04fd

Please sign in to comment.