cwFlowProc.cpp : More counter improvements.

This commit is contained in:
kevin 2024-04-26 17:47:34 -04:00
parent 95ae6d0525
commit c7cd952fcc

View File

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