From 0037fd78c17ef2977e4a16cb1f6a7f10471f3b8b Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Mon, 4 Dec 2023 20:08:42 +0100 Subject: [PATCH] Use std::numeric_limits::epsilon() instead of picking our own epsilon. --- apps/openmw/mwphysics/movementsolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwphysics/movementsolver.cpp b/apps/openmw/mwphysics/movementsolver.cpp index 02d24e735c..4952a561e7 100644 --- a/apps/openmw/mwphysics/movementsolver.cpp +++ b/apps/openmw/mwphysics/movementsolver.cpp @@ -214,7 +214,7 @@ namespace MWPhysics continue; // velocity updated, calculate nextpos again } - if ((newPosition - nextpos).length2() > 0.00001) + if ((newPosition - nextpos).length2() > std::numeric_limits::epsilon()) { // trace to where character would go if there were no obstructions tracer.doTrace(actor.mCollisionObject, newPosition, nextpos, collisionWorld, actor.mIsOnGround);