diff --git a/include/Nazara/Math/Sphere.inl b/include/Nazara/Math/Sphere.inl index 0a8d1adae..5252dbdbb 100644 --- a/include/Nazara/Math/Sphere.inl +++ b/include/Nazara/Math/Sphere.inl @@ -485,7 +485,7 @@ namespace Nz template T Sphere::SquaredDistance(const Vector3& point) const { - return Vector3f::SquaredDistance(point, GetPosition() + (point - GetPosition()).Normalize() * radius); + return Vector3f::SquaredDistance(GetPosition(), point) - radius * radius; } /*!