What does this even mean?

This code is an example code for a water level sensor and was given to me without any attached explanation of how it works. can anyone please explain?

int adc_id = 0;
int HistoryValue = 0;
char printBuffer[128];

void setup()
{
  Serial.begin(9600);
}

void loop()
{
    int value = analogRead(adc_id); 

    if(((HistoryValue>=value) && ((HistoryValue - value) > 10)) || ((HistoryValue<value) && ((value - HistoryValue) > 10)))
    {
      sprintf(printBuffer,"ADC%d level is %d\n",adc_id, value);
      Serial.print(printBuffer);
      HistoryValue = value;
    }
}
if(((HistoryValue>=value) && ((HistoryValue - value) > 10)) || ((HistoryValue<value) && ((value - HistoryValue) > 10)))

(
if the previous value is greater than or equal to the value just read
AND
the difference between the previous value and the value just read is greater than 10
)
OR
(
the previous value is not zero
AND
the value just read is at least 10 greater than the previous value
)
then do something

Its using hysteresis to avoid being affected by small changes or noise in the signal. It would be much clearer and simpler if written as:

  if (abs (value - HistoryValue) > 10) // if more than 10 different from last recorded reading
  {
     ...
     HistoryValue = value ;
  }