LibMath

  • 1 page found
NameAuthorLast updated byUpdated on
NameAuthorLast updated byUpdated on
Main Humbedooh Humbedooh Nov 18, 2010
LibMath is a collection of math functions that extends the Lua math library significantly. Functions math.avg (...) Returns the average (mean value) of the numbers passed. Usage: local avg = math.avg(1,2,3,4,5) assert(avg == 3) -- (1+2+3+4+5)/5 = 3 math.ceil (number[, significance]) Rounds a number up to the nearest integer value or the nearest multiple of significance. Usage: local rounded = math.ceil(4.51) assert(rounded == 5) local minutes = math.ceil(110, 60) assert(minutes == 2)...
  • 1 page found