Post merge fixes

This commit is contained in:
Wojtek Figat
2021-02-23 22:43:07 +01:00
parent 5a9ca6f130
commit 84ee882439
3 changed files with 6 additions and 18 deletions

View File

@@ -223,13 +223,9 @@ namespace FlaxEngine
{
if (points == null)
throw new ArgumentNullException(nameof(points));
// Check that start is in the correct range
if ((start < 0) || (start >= points.Length))
if (start < 0 || start >= points.Length)
throw new ArgumentOutOfRangeException(nameof(start), start, string.Format("Must be in the range [0, {0}]", points.Length - 1));
// Check that count is in the correct range
if ((count <= 0) || (start + count > points.Length))
if (count <= 0 || start + count > points.Length)
throw new ArgumentOutOfRangeException(nameof(count), count, string.Format("Must be in the range <= {0}", points.Length));
int upperEnd = start + count;
@@ -247,15 +243,13 @@ namespace FlaxEngine
for (int i = start; i < upperEnd; ++i)
{
// We are doing a relative distance comparison to find the maximum distance from the center of our sphere
float distance;
Vector3.DistanceSquared(ref center, ref points[i], out float distance);
if (distance > radius)
radius = distance;
}
// Find the real distance from the DistanceSquared
radius = (float)Math.Sqrt(radius);
radius = Mathf.Sqrt(radius);
// Construct the sphere
result.Center = center;

View File

@@ -804,15 +804,7 @@ void DebugDraw::DrawActors(Actor** selectedActors, int32 selectedActorsCount, bo
if (drawScenes)
{
Function<bool(Actor*)> function = [](Actor* actor)-> bool
{
if (actor->IsActiveInHierarchy())
{
actor->OnDebugDraw();
return true;
}
return false;
};
Function<bool(Actor*)> function = &DrawActorsTreeWalk;
SceneQuery::TreeExecute(function);
}
}

View File

@@ -23,6 +23,8 @@
#define VMA_MIN(v1, v2) (Math::Min((v1), (v2)))
#define VMA_MAX(v1, v2) (Math::Max((v1), (v2)))
#define VMA_SWAP(v1, v2) (::Swap((v1), (v2)))
#define VMA_NULLABLE
#define VMA_NOT_NULL
#include <ThirdParty/VulkanMemoryAllocator/vk_mem_alloc.h>
#endif