ws-cleanup: MeshFlatten, Zip and the SVG style parser reuse Types.Scene.mul, Types.Date.civilFromDays, Raster.multiply
This commit is contained in:
1 parent
44a599f00c
commit
f5cf02026d
4 files changed
+6
-36
No files matched your search
@@ -109,20 +109,7 @@ end
|
||||
-- ------------------------------------------------------------------------------------------------ transforms
|
||||
local IDENTITY = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 }
|
||||
|
||||
-- column-major 4x4 product a * b
|
||||
local function mul(a: { number }, b: { number }): { number }
|
||||
local m = table.create(16, 0)
|
||||
for c = 0, 3 do
|
||||
for r = 0, 3 do
|
||||
local s = 0
|
||||
for k = 0, 3 do
|
||||
s += a[k * 4 + r + 1] * b[c * 4 + k + 1]
|
||||
end
|
||||
m[c * 4 + r + 1] = s
|
||||
end
|
||||
end
|
||||
return m
|
||||
end
|
||||
local mul = Types.Scene.mul -- column-major 4x4 product a * b
|
||||
|
||||
local function numList(v: any, n: number): boolean
|
||||
if type(v) ~= "table" then
|
||||
|
||||
Reference in new issue
Block a user