check if an always increasing variable has stop increasing

float distance is always increasing, when it stop by a not really that important factor. i want to check it.

Generally, the easiest way to compare is to maintain a second variable with the value at the previous point of reference.

// C#

float lastValue;
float currentValue;

void Update()
{
    currentValue = valueToMaintain; // Whatever value you might be holding
    
    if(lastValue == currentValue)
    {
        // The value didn't change in the last frame
    }
    
    lastValue = currentValue;
}

Can’t you just store its value from 1 update to another, and check if the new value is bigger or not?