This commit is contained in:
Quaternions 2024-08-22 13:58:12 -07:00
parent e47b1ff6f9
commit 1841077e49

View File

@ -314,3 +314,22 @@ pub fn push_solve(contacts:&Vec<Contact>,point:Planar64Vec3)->Option<Planar64Vec
} }
} }
} }
#[cfg(test)]
mod tests{
use super::*;
#[test]
fn test_push_solve(){
let contacts=vec![
Contact{
position:Planar64Vec3::ZERO,
velocity:Planar64Vec3::Y,
normal:Planar64Vec3::Y,
}
];
assert_eq!(
Some(Planar64Vec3::ZERO),
push_solve(&contacts,Planar64Vec3::NEG_Y)
);
}
}