Lua HMF

About Lua HMF

Type: Lua module
License: Free
Supported platforms:

       

Categories:
  • Math

Lua Helper Math Functions (LuaHMF) is a small library which offers a clean, minimalistic but powerful API for greatest common divisor, least common multiple for two or more numbers and coming soon more functions.

Code example:

local hmf = require(dirLuaHMF)
print( hmf.mgcd({72,9}) )
-- 72,9,12,6,54: 9
print( hmf.mgcd({72,9,12,6,54}) )
-- 72,9,12,6,54: 3
print( hmf.mlcm({72,9,12,6,54}) )
-- 72,9,12,6,54: 216
print( hmf.mlcm({9,12}) )
-- 9,12: 36