title: Invert Number in C#
body: <p>Is there an easy way to invert a number in C# with a function?
  I'm using XNA and i'd like to tell my program that if my 'variable' gets beyond a certain number it has to invert it's value.
  The whole point is to give a rebound effect.</p>
  
  <pre><code>     if (ballPosition.X &gt;= screenWidth)
                  {
                      // Invert the ball Direction Vector.X
                  }
  </code></pre>