Math/Plane: Fix construction from 3 points

This commit is contained in:
SirLynix
2023-06-23 13:23:26 +02:00
parent b2538028b4
commit 2f1e2f94d7
3 changed files with 5 additions and 3 deletions

View File

@@ -88,7 +88,7 @@ namespace Nz
normal = edge1.CrossProduct(edge2);
normal.Normalize();
distance = normal.DotProduct(point3);
distance = -normal.DotProduct(point3);
}
/*!
@@ -139,7 +139,7 @@ namespace Nz
template<typename T>
constexpr T Plane<T>::SignedDistance(const Vector3<T>& point) const
{
return normal.DotProduct(point) + distance; // ax + by + cz + d = 0.
return normal.DotProduct(point) + distance; // ax + by + cz + d = 0
}
/*!