diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-27 23:54:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-27 23:54:50 +0300 |
commit | a4965249ec035953249abd2bdc47a86c764f4040 (patch) | |
tree | accafdb3ffdcdf52fa5a3860d8637317b8666923 /source/blender/blenlib/intern/math_vector.c | |
parent | f478c2cfbd3861cfca1d1a019066d30a4410a1f7 (diff) |
Math Lib: add range_vn_u
Diffstat (limited to 'source/blender/blenlib/intern/math_vector.c')
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index e9909cef29d..8f536bfe75c 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -897,6 +897,16 @@ void range_vn_i(int *array_tar, const int size, const int start) } } +void range_vn_u(unsigned int *array_tar, const int size, const unsigned int start) +{ + unsigned int *array_pt = array_tar + (size - 1); + unsigned int j = start + (unsigned int)(size - 1); + int i = size; + while (i--) { + *(array_pt--) = j--; + } +} + void range_vn_fl(float *array_tar, const int size, const float start, const float step) { float *array_pt = array_tar + (size - 1); |