Refactors GJK tetrahedron handling

Updates the `handle_tetrahedron` function to use const references for simplex points, improving efficiency and readability.

Corrects a potential bug where the `simplex` variable wasn't being correctly updated when recursively calling `handle_triangle`.

Also, const-qualifies `point_to_same_direction` for better safety.
This commit is contained in:
2025-11-09 14:15:32 +03:00
parent 5c81533c06
commit 4c525d5c31
3 changed files with 17 additions and 17 deletions

View File

@@ -217,7 +217,7 @@ namespace omath
}
[[nodiscard]]
bool point_to_same_direction(const Vector3& other)
bool point_to_same_direction(const Vector3& other) const
{
return dot(other) > static_cast<Type>(0);
}