match the exact ordering of the source code

This commit is contained in:
Quaternions 2024-08-22 19:38:46 -07:00
parent 1841077e49
commit 1372e12301

View File

@ -301,11 +301,15 @@ pub fn push_solve(contacts:&Vec<Contact>,point:Planar64Vec3)->Option<Planar64Vec
return Some(ray.origin);
}
//edit the indices
if conts.len()==4{
conts.pop();
//push_front
if conts.len()==conts.capacity(){
//this is a dead case, new_conts never has more than 3 elements
conts.rotate_right(1);
conts[0]=next_cont;
}else{
conts.push(next_cont);
conts.rotate_right(1);
}
conts.push(next_cont);
let meet_point=ray.extrapolate(next_t);
match get_best_push_ray_and_conts(meet_point,conts){