Module:Infobox interval: Difference between revisions
m moved S-expression link |
Make harmonic entropy display opt-in |
||
| Line 278: | Line 278: | ||
end | end | ||
if regular then | local harmonic_entropy = frame.args["Harmonic entropy"] | ||
table.insert(infobox_data, { | if regular and value_provided(harmonic_entropy) then | ||
harmonic_entropy_switch = harmonic_entropy:match("^[Yy][Ee][Ss]$") | |||
if harmonic_entropy_switch then | |||
table.insert(infobox_data, { | |||
"[[Harmonic entropy]]<br>(Shannon, <math>\\sqrt{nd}</math>)", | |||
"~" .. utils._round(he.harmonic_entropy(cents), 6) .. " bits", | |||
}) | |||
end | |||
end | end | ||