I'm writing code for an AI that has a part to do with sound.
local dB = 10 * math.log10(10^(L1 / 10) + 10^(L2 / 10) + 10^(L3 / 10))
I want 10^(L#/10) to repeat for however many "L"s there are. In the equasion im refrencing its written as 10^(L3/10) + ··· + 10^(L#/10). How can I do this in lua?

3 comments
what is L supposed to be? is it a function of another number or just an integer going from 1 to a number
"L1, L2, ... L# = sound pressure level of the separate sources in dBSPL" Is what the source says. Does that help? I'm getting it from a list of sound emitters in a folder with GetChildren.
Oh okay that makes more sense