Re: modular arithmatic in pipmak
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2009-04-03 18:11:55
|
> I was reading the lua's online manual. i was looking for the mod > function ( > as % in C++) I found these: > > math.fmod (x, y) and also > bit.mod(a,b) - returns the integer remainder of a divided by b > > but niether of them work in pipmak. Is there a mod function in pipmak? Yes, there is math.mod(a, b): http://www.lua.org/manual/5.0/manual.html#5.5 math.fmod() is new in Lua 5.1, which Pipmak doesn't use yet. bit.mod() is not part of the standard libraries that come with Lua and are included in Pipmak. > http://www.wowwiki.com/Lua_functions As that page says, "a few functions differ slightly in Blizzard's implementation", so in general you're better served by the Lua 5.0 manual (link above) for the standard functions and the Pipmak manual for what Pipmak adds to them, than by documentation about World of Warcraft or other applications that use (possibly modified versions of) Lua. -Christian |