code: @Pure
  	public int getPointIndex(int groupIndex, int position) {
  		final int groupMemberCount = getPointCountInGroup(groupIndex);
  		final int pos;
  		if (position < 0) {
  			pos = 0;
  		} else if (position >= groupMemberCount) {
  			pos = groupMemberCount - 1;
  		} else {
  			pos = position;
  		}
  
  		// Move the start/end indexes to corresponds to the bounds of the new points
  		return (firstInGroup(groupIndex) + pos * 2) / 2;
  	}
docs: Replies the global index of the point that corresponds to
  the position in the given group.
  
  @param groupIndex the group index.
  @param position is the index of the point in the group
  @return the global index of the point
  @throws IndexOutOfBoundsException in case of error.