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>2013-09-06 00:54:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-06 00:54:32 +0400
commit3b72f1824cf06216c70101ee0d29004cc6dc632d (patch)
tree56981fdefd7a0de0d37e4feab3acaea7c1b744ef /source/blender/blenkernel/intern/anim.c
parentf6b37f34ec2593b12b67046cf032acc202e2fa54 (diff)
rename positive_mod to mod_i, make it work with nagative numbers (matching pythons modulo), and use in a few more places.
allow mesh-checker-deselect to have a negative offset.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r--source/blender/blenkernel/intern/anim.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 3d8b70b693b..49c9a8e9083 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -594,8 +594,7 @@ void calc_curvepath(Object *ob, ListBase *nurbs)
static int interval_test(const int min, const int max, int p1, const int cycl)
{
if (cycl) {
- if (p1 < min) p1 = ((p1 - min) % (max - min + 1)) + max + 1;
- else if (p1 > max) p1 = ((p1 - min) % (max - min + 1)) + min;
+ p1 = mod_i(p1 - min, (max - min + 1)) + min;
}
else {
if (p1 < min) p1 = min;