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-28 08:16:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-28 08:25:02 +0400
commitac07046e55e515cbecbb2a528e97c0d57106f552 (patch)
treeede06d810b46136ce551bfb57ba0e68db1a733b7 /source/blender/blenlib/BLI_utildefines.h
parent5981567ec6afb3ae95f24c28b2c72bff0d8e01e6 (diff)
BMesh: optimize quad_coord, avoid duplicate sqrt calls
Diffstat (limited to 'source/blender/blenlib/BLI_utildefines.h')
-rw-r--r--source/blender/blenlib/BLI_utildefines.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 9f6eabf3a66..bb1b3a368f0 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -276,6 +276,13 @@
else if ((a) > (c)) (a) = (c); \
} (void)0
+#define CLAMP_MAX(a, c) { \
+ if ((a) > (c)) (a) = (c); \
+} (void)0
+
+#define CLAMP_MIN(a, b) { \
+ if ((a) < (b)) (a) = (b); \
+} (void)0
#define IS_EQ(a, b) ( \
CHECK_TYPE_INLINE(a, double), CHECK_TYPE_INLINE(b, double), \