diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-08-06 10:46:36 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-08-06 10:46:36 +0300 |
commit | 1ab75c1d494422270fa88bbf23cc42f7b203ed4b (patch) | |
tree | c70f4ef4118deb6efe01477438bddf800f503560 /source/blender/blenlib/BLI_range.h | |
parent | bb8ce95b5ee79787d0a54cb59f522726d693dc7d (diff) |
Cleanup: use range2f in `ED_keylist_find_any_between`.
Diffstat (limited to 'source/blender/blenlib/BLI_range.h')
-rw-r--r-- | source/blender/blenlib/BLI_range.h | 5 |
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 |