@ 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 ; }
Replies the global index of the point that corresponds to the position in the given group .