From 26e4d8cab143fa1944d03263fcf9a982ee58a352 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 28 Nov 2023 18:43:40 -0800 Subject: [PATCH] absurdly swap everything everywhere --- src/face_crawler.rs | 2 +- src/model_physics.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/face_crawler.rs b/src/face_crawler.rs index 4d6a00b..3081eb5 100644 --- a/src/face_crawler.rs +++ b/src/face_crawler.rs @@ -54,7 +54,7 @@ enum Transition{ for (i,&edge_face_id) in mesh.edge_faces(edge_id).iter().enumerate(){ let face_n=mesh.face_nd(edge_face_id).0; //edge_n gets parity from the order of edge_faces - let n=edge_n.cross(face_n)*((i as i64)*2-1); + let n=face_n.cross(edge_n)*((i as i64)*2-1); let d=n.dot(vert_sum); //WARNING yada yada d *2 for t in zeroes2((n.dot(body.position))*2-d,n.dot(body.velocity)*2,n.dot(body.acceleration)){ diff --git a/src/model_physics.rs b/src/model_physics.rs index 4a286e0..c366ac7 100644 --- a/src/model_physics.rs +++ b/src/model_physics.rs @@ -441,7 +441,7 @@ impl MinkowskiMesh<'_>{ for (i,&face_id) in self.edge_faces(edge_id).iter().enumerate(){ let face_n=self.face_nd(face_id).0; //edge-face boundary nd, n facing out of the face towards the edge - let boundary_n=edge_n.cross(face_n)*(i as i64*2-1); + let boundary_n=face_n.cross(edge_n)*(i as i64*2-1); let boundary_d=boundary_n.dot(vert_sum); // point.dot(boundary_n) is multiplied by two because vert_sum sums two vertices. if infinity_dir.dot(boundary_n)==Planar64::ZERO&&point.dot(boundary_n)*2<=boundary_d{