function Basic.GetTableRandom(h,f)if type(h)~="\116\097\098\108\101"then return h end local j=f or System.Random if h.Min and h.Max then return j:NextNumber(h.Min,h.Max)end local H=Basic.TableToArray(h)return H[j:NextInteger(1,#H)]end
-- @Description Retrieve a random element from a table, %Random is an optional Random Object.
-- @Arg1 Table
-- @Arg2 Random
function Basic.GetTableRandom(Tbl, rng)
	if type(Tbl) ~= "table" then
		return Tbl
	end

	local Rng = rng or System.Random
	if Tbl.Min and Tbl.Max then
		return Rng:NextNumber(Tbl.Min, Tbl.Max)
	end

	local Array = Basic.TableToArray(Tbl)
	return Array[Rng:NextInteger(1, #Array)]
end
