From 40e26be72e3a46edd14fe65d27a6b01ad3952b87 Mon Sep 17 00:00:00 2001 From: Orange Date: Thu, 13 Nov 2025 16:06:18 +0300 Subject: [PATCH] Refactors EPA algorithm loop Replaces the `for(;;)` loop in the EPA algorithm with a `while(true)` loop for improved readability and clarity. This change enhances the maintainability of the code without altering its functionality. --- include/omath/collision/epa_algorithm.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/omath/collision/epa_algorithm.hpp b/include/omath/collision/epa_algorithm.hpp index e6a3c0b..2c7f7e9 100644 --- a/include/omath/collision/epa_algorithm.hpp +++ b/include/omath/collision/epa_algorithm.hpp @@ -11,7 +11,8 @@ namespace omath::collision { template - concept EpaVector = requires(const V& a, const V& b, float s) { + concept EpaVector = requires(const V& a, const V& b, float s) + { { a - b } -> std::same_as; { a.cross(b) } -> std::same_as; { a.dot(b) } -> std::same_as; @@ -280,7 +281,7 @@ namespace omath::collision simplex.push_front(support); auto direction = -support; - for (;;) + while (true) { support = find_support_vertex(a, b, direction); if (support.dot(direction) <= 0.f)