Camera Movement in a World Map using XNA and C# I built a game as a tutorial, but I have since added functionality to allow the player to move around on a world map which requires the camera to "move"  but I no longer like the look of the if statements.  

is there some way that I can clean this up?

private static Rectangle scrollArea = new Rectangle(150, 150, 500, 300);




private void repositionCamera(GameTime gameTime, Vector2 moveAngle)
{
    float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
    float moveScale = playerSpeed * elapsed;

    if ((playerSprite.ScreenRectangle.X &lt; scrollArea.X) &amp;&amp; (moveAngle.X &lt; 0))
    {
        Camera.Move(new Vector2(moveAngle.X, 0) * moveScale);
    }

    if ((playerSprite.ScreenRectangle.Right &gt; scrollArea.Right) &amp;&amp; (moveAngle.X &gt; 0))
    {
        Camera.Move(new Vector2(moveAngle.X, 0) * moveScale);
    }

    if ((playerSprite.ScreenRectangle.Y &lt; scrollArea.Y) &amp;&amp; (moveAngle.Y &lt; 0))
    {
        Camera.Move(new Vector2(0, moveAngle.Y) * moveScale);
    }

    if ((playerSprite.ScreenRectangle.Bottom &gt; scrollArea.Bottom) &amp;&amp; (moveAngle.Y &gt; 0))
    {
        Camera.Move(new Vector2(0, moveAngle.Y) * moveScale);
    }
}
You can generalize bodies of ifs:

private static void MoveCamera(float x, float y, float moveScale)
{
    Camera.Move(new Vector2(x, y) * moveScale);
}

private void repositionCamera(GameTime gameTime, Vector2 moveAngle)
{
    float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
    float moveScale = playerSpeed * elapsed;

    if ((playerSprite.ScreenRectangle.X &lt; scrollArea.X) &amp;&amp; (moveAngle.X &lt; 0))
    {
        MoveCamera(moveAngle.X, 0, moveScale);
    }

    if ((playerSprite.ScreenRectangle.Right &gt; scrollArea.Right) &amp;&amp; (moveAngle.X &gt; 0))
    {
        MoveCamera(moveAngle.X, 0, moveScale);
    }

    if ((playerSprite.ScreenRectangle.Y &lt; scrollArea.Y) &amp;&amp; (moveAngle.Y &lt; 0))
    {
        MoveCamera(0, moveAngle.Y, moveScale);
    }

    if ((playerSprite.ScreenRectangle.Bottom &gt; scrollArea.Bottom) &amp;&amp; (moveAngle.Y &gt; 0))
    {
        MoveCamera(0, moveAngle.Y, moveScale);
    }
}


Also I suggest to extract all those conditions to properties with clear names like:

private static bool IsCameraOutOfLeft =&gt;
    playerSprite.ScreenRectangle.X &lt; scrollArea.X &amp;&amp; moveAngle.X &lt; 0;

private static bool IsCameraOutOfRight =&gt;
    playerSprite.ScreenRectangle.Right &gt; scrollArea.Right &amp;&amp; moveAngle.X &gt; 0;

...


Then finally the repositionCamera method will be

private void repositionCamera(GameTime gameTime, Vector2 moveAngle)
{
    float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
    float moveScale = playerSpeed * elapsed;

    if (IsCameraOutOfLeft || IsCameraOutOfRight)
    {
        MoveCamera(moveAngle.X, 0, moveScale);
    }

    if (IsCameraOutOfTop || IsCameraOutOfBottom)
    {
        MoveCamera(0, moveAngle.Y, moveScale);
    }
}


Also a method's name should be PascalCased – RepositionCamera.