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:
authorCampbell Barton <ideasman42@gmail.com>2015-03-25 12:28:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-03-25 12:29:38 +0300
commit3cee9d6939c85afd7eabf9fafbcec7859abef9a0 (patch)
tree77a7eee3f3b53a198918edd32dc33416ac262545 /source/blender/blenlib
parentb38b5846bac2b7674d9130e943df76f5f3626d6c (diff)
Simplify recent commit
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/rct.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c
index d7ca749b600..1edc9002611 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]));