/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h
for each i in (x, y, z) if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) ^ 2 else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) ^ 2
Whether the sphere/box intersect or not.
template<typename FReal> static bool SphereAABBIntersection ( const [UE::Math::TVector](API\Runtime\Core\Math\TVector)< FReal > & SphereCenter, const FReal RadiusSquared, const [UE::Math::TBox](API\Runtime\Core\Math\TBox)< FReal > & AABB )