Module:Temperament data: Difference between revisions
Jump to navigation
Jump to search
CompactStar (talk | contribs) No edit summary |
CompactStar (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
local p = {} | local p = {} | ||
function p.matmul(a, b) | |||
local result = {} | local result = {} | ||
for i | for i = 1, #a do | ||
result[i] = {} | result[i] = {} | ||
for j | for j = 1, #(b[1]) do | ||
result[i][j] = 0 | result[i][j] = 0 | ||
for k | for k = 1, #(a[1]) do | ||
result[i][j] = result[i][j] + a[i][k] * b[k][j] | result[i][j] = result[i][j] + a[i][k] * b[k][j] | ||
end | end |
Revision as of 21:49, 27 July 2023
Note: Do not invoke this module directly; use the corresponding template instead: Template:Temperament data.