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/editors/space_view3d/view3d_utils.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 3f7d6142758..22cdbb090a5 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -303,8 +303,8 @@ void ED_view3d_clipping_calc(
/* four clipping planes and bounding volume */
/* first do the bounding volume */
for (int val = 0; val < 4; val++) {
- float xs = (val == 0 || val == 3) ? rect->xmin : rect->xmax;
- float ys = (val == 0 || val == 1) ? rect->ymin : rect->ymax;
+ float xs = (ELEM(val, 0, 3)) ? rect->xmin : rect->xmax;
+ float ys = (ELEM(val, 0, 1)) ? rect->ymin : rect->ymax;
ED_view3d_unproject(region, xs, ys, 0.0, bb->vec[val]);
ED_view3d_unproject(region, xs, ys, 1.0, bb->vec[4 + val]);