public boolean isAtRest(){
  return Math.abs(mCurrentState.velocity) <= mRestSpeedThreshold && getDisplacementDistanceForState(mCurrentState) <= mDisplacementFromRestThreshold;
}

public boolean isAtRest ( ) { return Math . abs ( mCurrentState . velocity ) <= mRestSpeedThreshold && getDisplacementDistanceForState ( mCurrentState ) <= mDisplacementFromRestThreshold ; }
check if the current state is at rest
