because we need to find the nearest global min/max.(for situation when we have found more than one min/max value in the source matrix).