diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-01-27 16:49:53 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-01-27 17:13:08 +0100 |
| commit | da92e5c2837b27433286cf0dd9d887fd44dda254 (patch) | |
| tree | 00428ce290288f5c64e53dee13d88ffdde4df0ca /examples3d/joints3.rs | |
| parent | aef873f20e7a1ee66b9d4c066884fa794048587b (diff) | |
| download | rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.gz rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.bz2 rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.zip | |
Fix clippy and enable clippy on CI
Diffstat (limited to 'examples3d/joints3.rs')
| -rw-r--r-- | examples3d/joints3.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/examples3d/joints3.rs b/examples3d/joints3.rs index 18a11e7..73f48ae 100644 --- a/examples3d/joints3.rs +++ b/examples3d/joints3.rs @@ -482,7 +482,7 @@ fn create_actuated_revolute_joints( } else if i == num - 1 { let stiffness = 200.0; let damping = 100.0; - joint = joint.motor_position(3.14 / 2.0, stiffness, damping); + joint = joint.motor_position(std::f32::consts::FRAC_PI_2, stiffness, damping); } if i == 1 { @@ -541,7 +541,7 @@ fn create_actuated_spherical_joints( colliders.insert_with_parent(collider, child_handle, bodies); if i > 0 { - let mut joint = joint_template.clone(); + let mut joint = joint_template; if i == 1 { joint = joint @@ -554,7 +554,12 @@ fn create_actuated_spherical_joints( joint = joint .motor_position(JointAxis::AngX, 0.0, stiffness, damping) .motor_position(JointAxis::AngY, 1.0, stiffness, damping) - .motor_position(JointAxis::AngZ, 3.14 / 2.0, stiffness, damping); + .motor_position( + JointAxis::AngZ, + std::f32::consts::FRAC_PI_2, + stiffness, + damping, + ); } if use_articulations { |
