Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/rct.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index b73c5865e1a..6bbe655b1cd 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -30,6 +30,7 @@
#include <float.h>
#include <limits.h>
+#include "BLI_math_base.h"
#include "BLI_rect.h"
#include "BLI_utildefines.h"
@@ -541,6 +542,14 @@ void BLI_rcti_do_minmax_v(rcti *rect, const int xy[2])
}
}
+void BLI_rcti_do_minmax_rcti(rcti *rect, const rcti *other)
+{
+ rect->xmin = min_ii(rect->xmin, other->xmin);
+ rect->xmax = max_ii(rect->xmax, other->xmax);
+ rect->ymin = min_ii(rect->ymin, other->ymin);
+ rect->ymax = max_ii(rect->ymax, other->ymax);
+}
+
void BLI_rctf_do_minmax_v(rctf *rect, const float xy[2])
{
if (xy[0] < rect->xmin) {