Skip to content

Commit

Permalink
fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Jun 15, 2024
1 parent a09e579 commit 1ee03a4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion editor/src/camera/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ impl CameraController {
}
}

if let Some(v) = move_vec.try_normalize(std::f32::EPSILON) {
if let Some(v) = move_vec.try_normalize(f32::EPSILON) {
move_vec = v.scale(self.speed_factor * settings.camera.speed * dt);
}

Expand Down
4 changes: 2 additions & 2 deletions editor/src/interaction/gizmo/rotate_gizmo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ impl RotationGizmo {
if let Some(new_pos) = offset_ray.plane_intersection_point(&plane) {
let center = transform.position();
let old = (old_pos - center)
.try_normalize(std::f32::EPSILON)
.try_normalize(f32::EPSILON)
.unwrap_or_default();
let new = (new_pos - center)
.try_normalize(std::f32::EPSILON)
.try_normalize(f32::EPSILON)
.unwrap_or_default();

let angle_delta = old.dot(&new).clamp(-1.0, 1.0).acos();
Expand Down
2 changes: 2 additions & 0 deletions fyrox-core-derive/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::manual_unwrap_or_default)]

mod component;
mod reflect;
mod uuid;
Expand Down

0 comments on commit 1ee03a4

Please sign in to comment.