@VisibleForTesting boolean isDifferenceSignificant(double oldAverageMovingSpeed,double newAverageMovingSpeed){
  if (oldAverageMovingSpeed == 0) {
    return newAverageMovingSpeed != 0;
  }
  double maxValue=Math.max(oldAverageMovingSpeed,newAverageMovingSpeed);
  double differencePercentage=Math.abs(oldAverageMovingSpeed - newAverageMovingSpeed) / maxValue * 100.0;
  return differencePercentage >= CRITICAL_DIFFERENCE_PERCENTAGE;
}

@ VisibleForTesting boolean isDifferenceSignificant ( double oldAverageMovingSpeed , double newAverageMovingSpeed ) { if ( oldAverageMovingSpeed == 0 ) { return newAverageMovingSpeed != 0 ; } double maxValue = Math . max ( oldAverageMovingSpeed , newAverageMovingSpeed ) ; double differencePercentage = Math . abs ( oldAverageMovingSpeed - newAverageMovingSpeed ) / maxValue * 100.0 ; return differencePercentage >= CRITICAL_DIFFERENCE_PERCENTAGE ; }
returns true if the average moving speed and the new average moving speed are significantly different .
