mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
removed nesting
This commit is contained in:
@@ -115,9 +115,9 @@ namespace omath::collision
|
||||
out.iterations = it + 1;
|
||||
}
|
||||
|
||||
// Fallback: pick closest face as best-effort answer
|
||||
if (!faces.empty())
|
||||
{
|
||||
if (faces.empty())
|
||||
return std::nullopt;
|
||||
|
||||
const auto best = *std::ranges::min_element(faces, [](const auto& first, const auto& second)
|
||||
{ return first.d < second.d; });
|
||||
out.normal = best.n;
|
||||
@@ -129,8 +129,6 @@ namespace omath::collision
|
||||
|
||||
return out;
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
struct Face final
|
||||
|
||||
Reference in New Issue
Block a user