improved code style

This commit is contained in:
2025-12-28 02:29:19 +03:00
parent 00fcdc86bc
commit ffcf448a07
6 changed files with 112 additions and 119 deletions

View File

@@ -32,10 +32,8 @@ TEST(EpaInternal, SolveHandlesSmallPolytope)
params.max_iterations = 16;
params.tolerance = 1e-6f;
const auto result = EpaDummy::solve(a, b, s, params);
// Should either return a valid result or gracefully return nullopt
if (result)
if (const auto result = EpaDummy::solve(a, b, s, params))
{
EXPECT_TRUE(std::isfinite(result->depth));
EXPECT_TRUE(std::isfinite(result->normal.x));