diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 02:47:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-26 02:47:54 +0400 |
commit | b32bf2c462970912c2e8013fcf6f0ee5e3eaadd5 (patch) | |
tree | 1f676fef36a65b7f9f55ffbf63bf3f68e4a727e0 /source/blender/editors/screen/glutil.c | |
parent | 2223ca1c20cf480ca77365ff3593066c655de9fa (diff) |
code cleanup: use min_/max_ math functions, add minmax_v2_v2v2.
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index c1811adf2d8..ce2d045dc80 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -600,8 +600,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo /* The maximum pixel amounts the image can be cropped * at the lower left without exceeding the origin. */ - int off_x = floor(MAX2(ix, 0)); - int off_y = floor(MAX2(iy, 0)); + int off_x = floor(max_ff(ix, 0.0f)); + int off_y = floor(max_ff(iy, 0.0f)); /* The zoomed space coordinate of the raster position * (starting at the lower left most unclipped pixel). |