title: C# Strange Incremental bug
body: <p>Hi all I have a small problem but for me, is a big problem.</p>
  
  <p>First, I have a class called <code>NPC</code></p>
  
  <pre><code>public void Update()
                {
  
                    if (m_iMoveX != 0 || m_iMoveY != 0)
                        m_iFrame = (m_iFrame + 1) % 16;
                    else
                        m_iFrame = 0;
  
                    if (m_iPause &gt; 0)
                        --m_iPause;
  
                    if (m_iMoveX &gt; 0)
                    {
                        m_iPosX += 2;
                        m_iMoveX -= 2;
                    }
  
                    if (m_iMoveX &lt; 0)
                    {
                        m_iPosX -= 2;
                        m_iMoveX += 2;
                    }
  
                    if (m_iMoveY &gt; 0)
                    {
                        m_iPosY += 2;
                        m_iMoveY -= 2;
                    }
  
                    if (m_iMoveY &lt; 0)
                    {
                        m_iPosY -= 2;
                        m_iMoveY += 2;
                    }
                }
  </code></pre>
  
  <p>Description.
  <code>m_iMove</code> are a stored movement first to walk
  <code>m_iPos</code> are a real coordinates for NPC.</p>
  
  <p>when I make a npc walk, I set on <code>m_iMove + 32</code>.
  in update, <code>iPos</code> increments and <code>iMove</code> decrement.
  if <code>iMove</code> are 0 the movemente are completed.</p>
  
  <p>The NPC walk on grid 32x32 pixel.</p>
  
  <p>Now I think work fine, but see this screenshoot</p>
  
  <p><a href="https://i.stack.imgur.com/y6LYu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y6LYu.png" alt="Look Title Caption"></a></p>
  
  <p><code>iMove</code> are equal to 0. Actually No movement.
  <code>iPos</code> are 96, it's a NPC Coords.</p>
  
  <p>when I increment movement</p>
  
  <pre><code>   pl.m_iMoveY += 32;  //Increments iMove for the movement                     
  
       pl.m_npcDirection = NPCDirection.Dowm; //Setup the face
       if (pl.m_iMoveY &gt; 32)  //if i press KeyDown and iMove have a value &gt; of 32
       pl.m_iMoveY = 32; //Force to execute 32 pixel movement
  </code></pre>
  
  <p>See this screen</p>
  
  <p><a href="https://i.stack.imgur.com/IGsqR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IGsqR.png" alt="Look Title Caption"></a></p>
  
  <p>Now the NPC Coords are 132 for what?</p>
  
  <p>No have idea for this bug.
  I increments 32 pixel for the movement.</p>
  
  <p>96 + 32 = 128 but I see 132</p>
  
  <p>Does anyone have an idea?</p>