How to check if the transform position of the x is increasing or decreasing?

Soooo I want to make an if statement checking if the transform position of the x is increasing or decreasing, Maybe something like this:

if(xPos <xPos){
//statement
}

public GameObject Cube;

public float currentXPosition;

void Start()
{
    currentXPosition = Cube.transform.position.x;
}

void Update()
{
    if (Cube.transform.position.x > currentXPosition)
    {
        // X is increasing
        // update currentXPosition with new X value
        currentXPosition = Cube.transform.position.x;
    }

    if (Cube.transform.position.x < currentXPosition)
    {
        // X is decreasing
        // update currentXPosition with new X value
        currentXPosition = Cube.transform.position.x;
    }
}