function findInterval(arr) {
	if (arr.length <= 1) {
		return;
	}

	// Sort array ascending
	arr.sort(function (a, b) {
		return a - b;
	});

	// 1. Multiply array by 100
	arr = arr.map(function (x) {
		return x * 100000000;
	});

	// 2. Get diffs
	arr = getDiffs(arr);

	// 3. Calculate greatest common divisor of diffs and divide by 100
	let interval = arr.reduce((a, b) => gcd(a, b)) / 100000000;
	interval = Math.round((interval + Number.EPSILON) * 100000000) / 100000000;
	return interval;
}
This function is used to find the interval distance among numbers in an array.

@param {Array<number>} arr - An array containing numbers from which interval is calculated.
@return {number|undefined} The interval between numbers in the sorted array, or undefined if the array has only one element.