From 6ed5dd8028e3c32a535ce801d30bae2f25ef0a4f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Aug 2024 18:25:20 -0700 Subject: [PATCH] named epsilon --- src/push_solve.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/push_solve.rs b/src/push_solve.rs index 8b3f583..b2d32cc 100644 --- a/src/push_solve.rs +++ b/src/push_solve.rs @@ -1,5 +1,7 @@ use strafesnet_common::integer::{Planar64,Planar64Vec3}; +const EPSILON:Planar64=Planar64::raw(1<<(32-10)); + type Indices=arrayvec::ArrayVec; struct Ray{ @@ -51,7 +53,7 @@ const fn solve0()->Planar64Vec3{ fn solve1(c0:&Contact)->Option{ let d0=c0.normal.dot(c0.position); let det=c0.normal.dot(c0.velocity); - if det.get().abs()<0{ + if det.abs()