function not(fn) {
        return function () {
            var args = [];
            for (var _i = 0; _i < arguments.length; _i++) {
                args[_i] = arguments[_i];
            }
            return !fn.apply(void 0, args);
        };
    }
Helper method used to clip a diagonal index to the range of valid
diagonals. This also decides whether or not the diagonal index,
if it exceeds the boundary, should be clipped to the boundary or clipped
one inside the boundary depending on the Even/Odd status of the boundary
and numDifferences.
@param diagonal The index of the diagonal to clip.
@param numDifferences The current number of differences being iterated upon.
@param diagonalBaseIndex The base reference diagonal.
@param numDiagonals The total number of diagonals.
@returns The clipped diagonal index.