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:
authorJeroen Bakker <jeroen@blender.org>2021-08-06 10:46:36 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-06 10:46:36 +0300
commit1ab75c1d494422270fa88bbf23cc42f7b203ed4b (patch)
treec70f4ef4118deb6efe01477438bddf800f503560 /source/blender/blenlib
parentbb8ce95b5ee79787d0a54cb59f522726d693dc7d (diff)
Cleanup: use range2f in `ED_keylist_find_any_between`.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_range.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_range.h b/source/blender/blenlib/BLI_range.h
index ad4cd6c162e..e55f443769d 100644
--- a/source/blender/blenlib/BLI_range.h
+++ b/source/blender/blenlib/BLI_range.h
@@ -29,6 +29,11 @@ typedef struct Range2f {
float max;
} Range2f;
+BLI_INLINE bool range2f_in_range(const Range2f *range, const float value)
+{
+ return IN_RANGE(value, range->min, range->max);
+}
+
#ifdef __cplusplus
}
#endif