mirror of
https://github.com/orange-cpp/omath.git
synced 2026-04-21 21:43:26 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user