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>2012-09-18 12:00:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-18 12:00:19 +0400
commit8e641348f970f64150f3d4ec3665f967ed67efc6 (patch)
tree9ae466b94e2a405c6e681e6e10161537793be80e /source/blender/blenlib/BLI_rect.h
parent3094a02e6ef272f108a633c18981af593d038ee2 (diff)
fix own error BLI_rctf_cent_x/y were incorrectly returning int's, also quiet some warnings.
Diffstat (limited to 'source/blender/blenlib/BLI_rect.h')
-rw-r--r--source/blender/blenlib/BLI_rect.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index e64fb1a72b3..0c0c7f408fc 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -90,8 +90,8 @@ BLI_INLINE float BLI_rcti_cent_x_fl(const struct rcti *rct) { return (float)(rct
BLI_INLINE float BLI_rcti_cent_y_fl(const struct rcti *rct) { return (float)(rct->ymin + rct->ymax) / 2.0f; }
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct) { return (rct->xmin + rct->xmax) / 2; }
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct) { return (rct->ymin + rct->ymax) / 2; }
-BLI_INLINE int BLI_rctf_cent_x(const struct rctf *rct) { return (rct->xmin + rct->xmax) / 2.0f; }
-BLI_INLINE int BLI_rctf_cent_y(const struct rctf *rct) { return (rct->ymin + rct->ymax) / 2.0f; }
+BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct) { return (rct->xmin + rct->xmax) / 2.0f; }
+BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct) { return (rct->ymin + rct->ymax) / 2.0f; }
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct) { return (rct->xmax - rct->xmin); }
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct) { return (rct->ymax - rct->ymin); }