title: How can i stop saving the bitmap data when the float variable get to 360?
body: <p>At the top of the form i did:</p>
  
  <pre><code>private static float angleCopy;
  private Bitmap bmpnew;
  </code></pre>
  
  <p>Then in the constructor:</p>
  
  <pre><code>angleCopy = 0;
  bmpnew = new Bitmap(512, 512);
  </code></pre>
  
  <p>Then inside a timer tick event i assign the angleCopy to angleF_:</p>
  
  <pre><code>static float angleF_ = 0.0F;
          private void timer1_Tick(object sender, EventArgs e)
          {
              if (angleF_ &gt; 360F)
              {
                  angleF_ -= 360F;
              }
              ReturnTexture(scannedCloudsTexture, cloudPoints, angleArray, angleF_,bmpnew);
              DisplayOnScreen(angleF_);
              angleF_ += vScrollBar1.Value;//1.0F;
              angleCopy = angleF_;
          }
  </code></pre>
  
  <p>Then in the ReturnTexture method that i call it from the timer tick event in the bottom of the method i did:</p>
  
  <pre><code>if (angleCopy == 360)
              {
                  bmpnew.Save(@"c:\temp\bmpnewtest.bmp");
              }
  </code></pre>
  
  <p>I want that when it's getting to 360 to stop saving but not to stop the timer.
  The problem is that angleCopy will be now lower then 360 and it will keep saving all the time.</p>
  
  <p>How can i stop saving when it's getting to 360 ?</p>