[Bf-blender-cvs] [fa1fc11] blender-v2.74-release: Simplify recent commit

Campbell Barton noreply at git.blender.org
Thu Mar 26 12:19:31 CET 2015


Commit: fa1fc113442af3d197ff1b4bb8b984721c03b58c
Author: Campbell Barton
Date:   Wed Mar 25 20:28:17 2015 +1100
Branches: blender-v2.74-release
https://developer.blender.org/rBfa1fc113442af3d197ff1b4bb8b984721c03b58c

Simplify recent commit

===================================================================

M	source/blender/blenlib/intern/rct.c

===================================================================

diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index d7ca749..1edc900 100644
--- a/source/blender/blenlib/intern/rct.c
+++ b/source/blender/blenlib/intern/rct.c
@@ -593,12 +593,14 @@ void BLI_rctf_rotate_expand(rctf *dst, const rctf *src, const float angle)
 	const float cent[2] = {BLI_rctf_cent_x(src), BLI_rctf_cent_y(src)};
 	float corner[2], corner_rot[2], corder_max[2];
 
-	ARRAY_SET_ITEMS(corner, src->xmin - cent[0], src->ymax - cent[1]);
+	/* x is same for both corners */
+	corner[0] = src->xmax - cent[0];
+	corner[1] = src->ymax - cent[1];
 	ROTATE_SINCOS(corner_rot, mat2, corner);
 	corder_max[0] = fabsf(corner_rot[0]);
 	corder_max[1] = fabsf(corner_rot[1]);
 
-	ARRAY_SET_ITEMS(corner, src->xmax - cent[0], src->ymax - cent[1]);
+	corner[1] *= -1;
 	ROTATE_SINCOS(corner_rot, mat2, corner);
 	corder_max[0] = MAX2(corder_max[0], fabsf(corner_rot[0]));
 	corder_max[1] = MAX2(corder_max[1], fabsf(corner_rot[1]));




More information about the Bf-blender-cvs mailing list