cwFlowProc.cpp : Fix bugs in 'counter'.

This commit is contained in:
kevin 2024-04-26 17:44:33 -04:00
parent 6c65dec3c7
commit 6e3b59adb6

View File

@ -4198,12 +4198,12 @@ namespace cw
switch( p->mode_id ) switch( p->mode_id )
{ {
case kModuloModeId: case kModuloModeId:
cnt -= (maxv-minv) + incr; cnt = minv + (cnt-maxv);
break; break;
case kReverseModeId: case kReverseModeId:
p->dir = -1 * p->dir; p->dir = -1 * p->dir;
cnt = maxv - (cnt - maxv); cnt = maxv - (cnt-maxv);
break; break;
case kClipModeId: case kClipModeId:
@ -4221,7 +4221,7 @@ namespace cw
switch( p->mode_id ) switch( p->mode_id )
{ {
case kModuloModeId: case kModuloModeId:
cnt += (maxv - minv) + incr; cnt = maxv - (minv-cnt);
break; break;
case kReverseModeId: case kReverseModeId: