discover ternary method on bool

This commit is contained in:
Quaternions 2025-01-14 18:39:27 -08:00
parent 38d8dc1302
commit 405cba3549

View File

@ -1142,8 +1142,8 @@ impl PhysicsContext{
.map_or(None,|(face,dt)|{
// this must be rounded to avoid the infinite loop when hitting the start zone
let time=relative_body.time+dt.into();
if time<=state.time{None}else{Some((time,face,dt))}})
.map(|(time,face,dt)|
(state.time<time).then_some((time,face,dt))
}).map(|(time,face,dt)|
TimedInstruction{
time,
instruction:PhysicsInternalInstruction::CollisionStart(