added computeMinMax

From periodTypeMaj