code: public int convertPointToRelativePosition(int absolutePosition) {
          if (absolutePosition < lower || absolutePosition >= upper)
              throw new IllegalArgumentException("Position outside this range (" + absolutePosition + ").");
  
          if (reversed)
              return upper - 1 - absolutePosition;
          else
              return absolutePosition - lower;
      }
docs: Returns relative point position inside this range.
  
  @param absolutePosition absolute point position (in the same coordinates as this range boundaries)
  @return relative point position inside this range