Gracefully handle 0 acceleration for walking targets #19

Merged
Quaternions merged 1 commits from aidan9382/strafe-project:walk-0-accel into master 2025-11-18 19:47:05 +00:00
Member

Fixes #18

Fixes #18
aidan9382 added 1 commit 2025-11-18 19:26:54 +00:00
Quaternions requested changes 2025-11-18 19:37:48 +00:00
Dismissed
@@ -116,6 +115,10 @@ impl TransientAcceleration{
fn with_target_diff(target_diff:Planar64Vec3,accel:Planar64,time:Time)->Self{
if target_diff==vec3::ZERO{
TransientAcceleration::Reached
}else if accel==0{
Owner

Please use Planar64::ZERO instead of 0, 0 is implicitly converted to Planar64 for the comparison at run time.

Please use Planar64::ZERO instead of 0, 0 is implicitly converted to Planar64 for the comparison at run time.
Author
Member

my brain just assumed it was a static number for some reason

my brain just assumed it was a static number for some reason
aidan9382 marked this conversation as resolved
aidan9382 added 2 commits 2025-11-18 19:42:31 +00:00
Quaternions approved these changes 2025-11-18 19:46:55 +00:00
Quaternions merged commit 98069859b5 into master 2025-11-18 19:47:05 +00:00
aidan9382 deleted branch walk-0-accel 2025-11-18 20:21:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: StrafesNET/strafe-project#19