This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ffi = require("ffi") | |
local new = ffi.new | |
--[[ | |
All numeric calculations are performed with doubles. Using | |
floats for storage saves memory (for big arrays). But arithmetic | |
is usually slower due to the required float<->double conversions. | |
]] | |
local Matrix | |
local MatrixStructure = ffi.typeof("double[16]") |