From 10c91f8116dc6efdebbd7a4fccf3e2748ef05c47 Mon Sep 17 00:00:00 2001 From: great90 <897346026@qq.com> Date: Sun, 19 Dec 2021 11:51:14 +0800 Subject: Fix variable name 'max_size' to 'min_size' in aabb --- core/math/aabb.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'core/math') diff --git a/core/math/aabb.cpp b/core/math/aabb.cpp index 83726f46b5..0468d1e68b 100644 --- a/core/math/aabb.cpp +++ b/core/math/aabb.cpp @@ -286,14 +286,14 @@ int AABB::get_longest_axis_index() const { Vector3 AABB::get_shortest_axis() const { Vector3 axis(1, 0, 0); - real_t max_size = size.x; + real_t min_size = size.x; - if (size.y < max_size) { + if (size.y < min_size) { axis = Vector3(0, 1, 0); - max_size = size.y; + min_size = size.y; } - if (size.z < max_size) { + if (size.z < min_size) { axis = Vector3(0, 0, 1); } @@ -302,14 +302,14 @@ Vector3 AABB::get_shortest_axis() const { int AABB::get_shortest_axis_index() const { int axis = 0; - real_t max_size = size.x; + real_t min_size = size.x; - if (size.y < max_size) { + if (size.y < min_size) { axis = 1; - max_size = size.y; + min_size = size.y; } - if (size.z < max_size) { + if (size.z < min_size) { axis = 2; } -- cgit v1.2.3