--[[ @brief Normalizes an array using the 1 norm. The satellite array will be multiplied by the same normalizing factor.
     @param array The array to normalize.
--]]

function module.NormalizeArrayWithSatellite(array, satellite)
	local sum = module.Sum(array);
	if sum==0 then return; end
	for i = 1, #array do
		array[i] = array[i] / sum;
	end
	for i = 1, #satellite do
		satellite[i] = satellite[i] / sum;
	end
end
