The sum of the entries in the specified portion of the input array, or 0 if the designated subarray is empty.
Throws MathIllegalArgumentException
if the array is null.
@param values the input array
@param begin index of the first array element to include
@param length the number of elements to include
@return the sum of the values or 0 if length = 0
@throws MathIllegalArgumentException if the array is null or the array indexparameters are not valid