Tidying up IF statements with '<' '>' in them

Hi there,

Im trying to tidy up a bunch of IF statements and I cant think of a way passed it due to the greater than and less than symbols. If anyone could offer any suggestions would be great! Here is my code:

  if (transform.position.x > groundSizeX)
        {
            transform.position = updateX(-groundSizeX);
        }
        if (transform.position.x < -groundSizeX)
        {
            transform.position = updateX(groundSizeX);
        }

        if (transform.position.z > groundSizeZ)
        {
            transform.position = updateZ(-groundSizeZ);
        }
        if (transform.position.z < -groundSizeZ)
        {
            transform.position = updateZ(groundSizeZ);
        }

void YourFunction()
{
Vector3 position = transform.position;
position.x = LoopValue( position.x, -groundSizeX, groundSizeX ) ;
position.z = LoopValue( position.z, -groundSizeZ, groundSizeZ) ;
transform.position = position ;
}

private float LoopValue( float input, float min, float max )
{
    return input < min ? max : input > max ? min : input ;
}