diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-07 22:41:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-07 22:41:47 +0400 |
commit | c985a40abb80a7e62170d7f2e736377cca4623e8 (patch) | |
tree | f10f1a473e92d6806529f323e265a363c8454b7e /source/blender/blenlib/intern/rct.c | |
parent | 06791ba281d3aa091d11b69037443473b8d59f03 (diff) |
fix for own error confusing FLT_MIN with -FLT_MAX (didnt get into a release, dont include in log)
Diffstat (limited to 'source/blender/blenlib/intern/rct.c')
-rw-r--r-- | source/blender/blenlib/intern/rct.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/rct.c b/source/blender/blenlib/intern/rct.c index 658d45ad171..68a00d81444 100644 --- a/source/blender/blenlib/intern/rct.c +++ b/source/blender/blenlib/intern/rct.c @@ -206,19 +206,19 @@ void BLI_rcti_init(rcti *rect, int xmin, int xmax, int ymin, int ymax) } } -void BLI_rcti_init_minmax(struct rcti *rect) +void BLI_rcti_init_minmax(rcti *rect) { rect->xmin = rect->ymin = INT_MAX; rect->xmax = rect->ymax = INT_MIN; } -void BLI_rctf_init_minmax(struct rctf *rect) +void BLI_rctf_init_minmax(rctf *rect) { - rect->xmin = rect->ymin = FLT_MAX; - rect->xmax = rect->ymax = FLT_MIN; + rect->xmin = rect->ymin = FLT_MAX; + rect->xmax = rect->ymax = -FLT_MAX; } -void BLI_rcti_do_minmax_v(struct rcti *rect, const int xy[2]) +void BLI_rcti_do_minmax_v(rcti *rect, const int xy[2]) { if (xy[0] < rect->xmin) rect->xmin = xy[0]; if (xy[0] > rect->xmax) rect->xmax = xy[0]; @@ -226,7 +226,7 @@ void BLI_rcti_do_minmax_v(struct rcti *rect, const int xy[2]) if (xy[1] > rect->ymax) rect->ymax = xy[1]; } -void BLI_rctf_do_minmax_v(struct rctf *rect, const float xy[2]) +void BLI_rctf_do_minmax_v(rctf *rect, const float xy[2]) { if (xy[0] < rect->xmin) rect->xmin = xy[0]; if (xy[0] > rect->xmax) rect->xmax = xy[0]; |