How do I find out if x is decreasing?

I have a ball that is accelerating in the x axis, it hits a paddle, then it will bounce off and go the other way. Is there a way to make an If statement that has the condition of “If the x of the object is decreasing, then do this…”?

Here is a sample of the code I’m working with:

#pragma strict

var Player01 : Transform;
var Player02 : Transform;
var otherTransform : Transform;

function Update ()
{
	var relativePoint = transform.InverseTransformPoint(otherTransform.position);
	
	if(relativePoint.x < 0.0){//This is the IF statement I want to change
		if(relativePoint.y > Player01.position.y){
			
			if(relativePoint.x > -7){
				Player01.position.y +=.09;
			}
			if(relativePoint.x < -7){
				Player01.position.y -=.09;
			}
		}
		else{
			if(relativePoint.x > -7){
				Player01.position.y -=.09;
			}
			if(relativePoint.x < -7){
				Player01.position.y +=.09;
			}
		}
		//Player01.position.y = relativePoint.y;
	}
	else{
		if(relativePoint.y > Player02.position.y){
			if(relativePoint.x < 7){
				Player02.position.y +=.09;
			}
			if(relativePoint.x > 7){
				Player02.position.y -=.09;
			}
		}
		else{
			if(relativePoint.x < 7){
				Player02.position.y -=.09;
			}
			if(relativePoint.x > 7){
				Player02.position.y +=.08;
			}
		}
		//Player02.position.y = relativePoint.y;
	}
}

Player 1 is paddle 1.
Player 2 is paddle 2.
Other Transform is the Ball.

Store the x value of the object at the end of Update. Compare that previous value of x to the current value of x to see if the current value is less.