Refactors triangle calculations for generic vectors

Updates the `Triangle` class to use a generic `Vector` type instead of `Vector3`, enhancing flexibility and reusability.

Changes include updating relevant function return types to use `Vector::ContainedType` and adapting length and distance calculations accordingly.

This refactoring supports the ongoing work on the EPA algorithm (feature/epa_algorithm) by providing a more adaptable foundation for geometric calculations.
This commit is contained in:
2025-11-13 15:29:10 +03:00
parent ce1142dac9
commit d8d585e3eb
4 changed files with 13 additions and 10 deletions

View File

@@ -23,6 +23,7 @@ namespace omath
class Vector3 : public Vector2<Type>
{
public:
using ContainedType = Type;
Type z = static_cast<Type>(0);
constexpr Vector3(const Type& x, const Type& y, const Type& z) noexcept: Vector2<Type>(x, y), z(z)
{