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>2014-03-30 06:03:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-30 08:04:20 +0400
commita6e8137983d74ebff785ee134f635e1a08f58237 (patch)
tree6526fc6a6be6aa964d0df416922881d7421f8839 /source/blender/blenlib/BLI_rect.h
parentcc439f683b2b1603e94e9d27f420692b17b79f41 (diff)
Convenience macro for print_ funcs, saves passing id each time
Diffstat (limited to 'source/blender/blenlib/BLI_rect.h')
-rw-r--r--source/blender/blenlib/BLI_rect.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index b86a5bc51b0..a132ac40206 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -92,6 +92,9 @@ void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src);
void print_rctf(const char *str, const struct rctf *rect);
void print_rcti(const char *str, const struct rcti *rect);
+#define print_rctf_id(rect) print_rctf(STRINGIFY(rect), rect)
+#define print_rcti_id(rect) print_rcti(STRINGIFY(rect), rect)
+
BLI_INLINE float BLI_rcti_cent_x_fl(const struct rcti *rct) { return (float)(rct->xmin + rct->xmax) / 2.0f; }
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; }