View Single Post
05-19-16, 09:20 AM   #28
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
I remember I made a thread once that also was about getting aliases: http://forums.wowace.com/showthread.php?t=19736
The mentioned Wowpedia page for reference: http://wow.gamepedia.com/Lua_functions
Code:
local t = {}

for _, v1 in pairs( {math, string, table} ) do
	for k, v2 in pairs(v1)do
		t[v2] = k
	end
end

for k, v in pairs(_G) do
	if type(v) == "function" and t[v] then
		print(k, t[v])
	end
end
I think these are most of the aliases
There don't seem to be aliases for the bit functions
Lua Code:
  1. abs == math.abs
  2. ceil == math.ceil
  3. deg == math.deg
  4. exp == math.exp
  5. floor == math.floor
  6. frexp == math.frexp
  7. ldexp == math.ldexp
  8. log == math.log
  9. log10 == math.log10
  10. max == math.max
  11. min == math.min
  12. mod == math.fmod
  13. rad == math.rad
  14. random == math.random
  15. sqrt == math.sqrt
  16.  
  17. PI == math.pi
  18.  
  19. acos ~= math.acos
  20. asin ~= math.asin
  21. atan ~= math.atan
  22. atan2 ~= math.atan2
  23. cos ~= math.cos
  24. sin ~= math.sin
  25. tan ~= math.tan
  26.  
  27. format == string.format
  28. gmatch == string.gmatch
  29. gsub == string.gsub
  30. strbyte == string.byte
  31. strchar == string.char
  32. strfind == string.find
  33. strjoin == string.join
  34. strlen == string.len
  35. strlower == string.lower
  36. strmatch == string.match
  37. strrep == string.rep
  38. strrev == string.reverse
  39. strsplit == string.split
  40. strsub == string.sub
  41. strtrim == string.trim
  42. strupper == string.upper
  43.  
  44. foreach == table.foreach
  45. foreachi == table.foreachi
  46. getn == table.getn
  47. sort == table.sort
  48. tinsert == table.insert
  49. tremove == table.remove
  50. wipe == table.wipe

Last edited by Ketho : 05-19-16 at 09:34 AM.