summaryrefslogtreecommitdiffstats
path: root/core/math/dynamic_bvh.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/math/dynamic_bvh.h')
-rw-r--r--core/math/dynamic_bvh.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h
index f586b845c3..26fc517f7f 100644
--- a/core/math/dynamic_bvh.h
+++ b/core/math/dynamic_bvh.h
@@ -376,13 +376,8 @@ void DynamicBVH::convex_query(const Plane *p_planes, int p_plane_count, const Ve
volume.min = p_points[0];
volume.max = p_points[0];
} else {
- volume.min.x = MIN(volume.min.x, p_points[i].x);
- volume.min.y = MIN(volume.min.y, p_points[i].y);
- volume.min.z = MIN(volume.min.z, p_points[i].z);
-
- volume.max.x = MAX(volume.max.x, p_points[i].x);
- volume.max.y = MAX(volume.max.y, p_points[i].y);
- volume.max.z = MAX(volume.max.z, p_points[i].z);
+ volume.min = volume.min.min(p_points[i]);
+ volume.max = volume.max.max(p_points[i]);
}
}