Advertisement
Bolodefchoco_LUAXML

[Biblioteca] Oficiais

Nov 16th, 2015
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 17.09 KB | None | 0 0
  1. --Creator: Bolodefchoco
  2. --Made in: 16/11/2015
  3. --Last update: 06/12/2016
  4. --[[ Notes:
  5.     Other
  6.         assert
  7.             Does:
  8.                 Produz um erro quando o valor de seu argumento v é falso.
  9.             Args:
  10.                 value --> Argumento para verificação
  11.                 message --> Mensagem de erro
  12.         ipairs
  13.             Does:
  14.                 Itera os argumentos dentro de uma tabela ignorando as keys não numéricas.
  15.             Args:
  16.                 list --> Tabela
  17.         pairs
  18.             Does:
  19.                 Itera os argumentos de uma tabela
  20.             Args:
  21.                 list --> Tabela
  22.         tostring
  23.             Does:
  24.                 Recebe um valor de qualquer tipo e o converte para uma cadeia em um formato razoável.
  25.             Args:
  26.                 value --> Valor
  27.         type
  28.             Does:
  29.                 Retorna o tipo do valor introduzido.
  30.             Args:
  31.                 value --> Valor
  32.     Strings
  33.         string.len
  34.             Does:
  35.                 Retorna o comprimento da cadeia.
  36.             Args:
  37.                 str --> String
  38.         string.byte
  39.             Does:
  40.                 Retorna os códigos numéricos internos dos caracteres.
  41.             Args:
  42.                 str --> String
  43.                 i --> Índice inicial para a string
  44.                 j --> Índice final para a string
  45.         string.reverse
  46.             Does:
  47.                 Retorna uma cadeia que é a cadeia s invertida.
  48.             Args:
  49.                 str --> String
  50.         string.upper
  51.             Does:
  52.                 Retorna uma cópia da cadeia com todas as letras minúsculas convertidas para maiúsculas.
  53.             Args:
  54.                 str --> String
  55.         string.format
  56.             Does:
  57.                 Retorna uma versão formatada de seu número variável de argumentos seguindo a descrição dada em seu primeiro argumento.
  58.             Args:
  59.                 str --> String
  60.                 ... --> Variáveis de argumentos
  61.         string.rep
  62.             Does:
  63.                 Retorna uma cadeia que é a concatenação de int cópias da cadeia str separadas pela cadeia sep.
  64.             Args:
  65.                 str --> String
  66.                 int --> Quantidade de concatenações
  67.                 sep --> Separador das concatenações
  68.         string.lower
  69.             Does:
  70.                 Retorna uma cópia da cadeia com todas as letras maiúsculas convertidas para minúsculas.
  71.             Args:
  72.                 str --> String
  73.         string.sub
  74.             Does:
  75.                 Retorna a subcadeia de str que começa em i e continua até j
  76.             Args:
  77.                 str --> String
  78.                 i --> Índice inicial para a string
  79.                 j --> Índice final para a string
  80.         string.char
  81.             Does:
  82.                 Retorna uma cadeia com comprimento igual ao número de argumentos, na qual cada caractere tem um código numérico interno igual a seu argumento correspondente.
  83.             Args:
  84.                 ... --> Argumentos em byte
  85.     Tables
  86.         table.concat(list,sep,i,j)
  87.             Does:
  88.                 Retorna uma concatenção de todos os argumentos de list entre i e j separados por sep
  89.             Args:
  90.                 list --> Tabela
  91.                 sep --> Separação
  92.                 i --> Índice inicial para a tabela
  93.                 j --> Índice final para a tabela
  94.         table.remove(list,pos)
  95.             Does:
  96.                 Remove de list o elemento na posição pos, retornando o valor do elemento removido.
  97.             Args:
  98.                 list --> Tabela
  99.                 pos --> Posição do valor na tabela
  100.     Maths
  101.         math.deg
  102.             Does:
  103.                 Retorna o ângulo x (dado em radianos) em graus.
  104.             Args:
  105.                 x --> Ângulo
  106.         math.fmod
  107.             Does:
  108.                 Retorna o resto da divisão de x por y que arredonda o quociente em direção a zero.
  109.             Args:
  110.                 x --> Número 1
  111.                 y --> Número 2
  112.         math.asin
  113.             Does:
  114.                 Retorna o arco seno de x (em radianos).
  115.             Args:
  116.                 x --> Número
  117.             Requires:
  118.                 function xatan
  119.                 function satan
  120.         math.max
  121.             Does:
  122.                 Retorna o valor máximo entre seus argumentos.
  123.             Args:
  124.                 x --> Primeiro argumento
  125.                 ... --> Todos os outros argumentos
  126.         math.modf
  127.             Does:
  128.                 Retorna dois números, a parte integral de x e a parte fracionária de x.
  129.             Args:
  130.                 x --> Número
  131.         math.floor
  132.             Does:
  133.                 Retorna o maior inteiro menor ou igual a x.
  134.             Args:
  135.                 x --> Número
  136.         math.cosh
  137.             Does:
  138.                 Retorna o co-seno hiperbólico de x.
  139.             Args:
  140.                 x --> Número
  141.         math.ldexp
  142.             Does:
  143.                 Retorna m2^e
  144.             Args:
  145.                 m --> Número 1
  146.                 e --> Número 2
  147.         math.atan2
  148.             Does:
  149.                 Retorna o arco tangente de y/x (em radianos), mas usa os sinais de ambos os parâmetros para encontrar o quadrante do resultado.
  150.             Args:
  151.                 y --> Número 1
  152.                 x --> Número 2
  153.             Requires:
  154.                 function xatan
  155.                 function satan
  156.         math.pow
  157.             Does:
  158.                 Retorna x^y
  159.             Args:
  160.                 x --> Número 1
  161.                 y --> Número 2
  162.         math.abs
  163.             Does:
  164.                 Retorna o valor absoluto de x.
  165.             Args:
  166.                 x --> Número 1
  167.         math.tanh
  168.             Does:
  169.                 Retorna a tangente hiperbólica de x.
  170.             Args:
  171.                 x --> Número
  172.         math.acos
  173.             Does:
  174.                 Retorna o arco cosseno de x (em radianos).
  175.             Args:
  176.                 x --> Número
  177.         math.tan
  178.             Does:
  179.                 Retorna a tangente de x.
  180.             Args:
  181.                 x --> Número
  182.         math.min
  183.             Does:
  184.                 Retorna o valor mínimo entre seus argumentos.
  185.             Args:
  186.                 x --> Primeiro argumento
  187.                 ... --> Todos os outros argumentos
  188.         math.floor
  189.             Does:
  190.                 Retorna o maior inteiro maior ou igual a x.
  191.             Args:
  192.                 x --> Número
  193.         math.sinh
  194.             Does:
  195.                 Retorna o seno hiperbólico de x.
  196.             Args:
  197.                 x --> Número
  198.         math.sqrt
  199.             Does:
  200.                 Retorna a raiz quadrada de x.
  201.             Args:
  202.                 x --> Número
  203.         math.huge
  204.             Returns:
  205.                 Um valor maior ou igual a qualquer outro valor numérico.
  206.         math.rad
  207.             Does:
  208.                 Retorna o ângulo x (dado em graus) em radianos.
  209.             Args:
  210.                 x --> Ângulo
  211.         math.randomseed
  212.             Does:
  213.                 Semente do math.random
  214.         math.random
  215.             Does:
  216.                 Retorna um número aleatório
  217.             Args:
  218.                 m --> Número deverá partir de M
  219.                 n --> Número deverá ter o limite em N
  220.         math.sin
  221.             Does:
  222.                 Retorna o seno de x.
  223.             Args:
  224.                 x --> Número
  225.         math.exp
  226.             Does:
  227.                 Retorna o valor e^x
  228.             Args:
  229.                 x --> Número
  230.         math.cos
  231.             Does:
  232.                 Retorna o co-seno de x.
  233.             Args:
  234.                 x --> Número
  235.         math.atan
  236.             Does:
  237.                 Retorna o arco tangente de x (em radianos).
  238.             Args:
  239.                 x --> Número 2
  240.             Requires:
  241.                 function xatan
  242.                 function satan
  243.         math.pi
  244.             Returns:
  245.                 O valor de π.
  246.        
  247. ]]--
  248.  
  249. --------------------------------------------> Other <--------------------------------------------
  250.  
  251. assert=function(value,message)
  252.     if value then return value else error(message or 'assertion failed!') end
  253. end
  254.  
  255. ipairs=function(list)
  256.     return (function(k,v)
  257.         v=v+1
  258.         local tIT=k[v]
  259.         if tIT then
  260.             return v,tIT
  261.         end
  262.     end),list,0
  263. end
  264.  
  265. pairs=function(list)
  266.     return next,list,nil
  267. end
  268.  
  269. tostring=function(value)
  270.     return string.format("%s",value)
  271. end
  272.  
  273. type=function(value)
  274.     if not value then return nil end
  275.     if value == tonumber(value) then
  276.         return "number"
  277.     end
  278.     if value == tostring(value) then
  279.         return "string"
  280.     end
  281.     if tostring(value) == "true" or tostring(value) == "false" then
  282.         return "boolean"
  283.     end
  284.     if tostring(value):match('^table.*') then
  285.         return "table"
  286.     end
  287.     if tostring(value):match('^function.*') then
  288.         return "function"
  289.     end
  290. end
  291.  
  292. --------------------------------------------> Strings <--------------------------------------------
  293.  
  294. string.len=function(str)
  295.     return #str
  296. end
  297.  
  298. string.byte=function(str,i,j)
  299.     i = i or 1;j = j or i
  300.     local chars = [[   
  301.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������
  302. ]]
  303.     local bytes = {}
  304.     for v = i,j do
  305.         table.insert(bytes,(chars:find(str:sub(v,v))))
  306.     end
  307.     return table.unpack(bytes)
  308. end
  309.  
  310. string.reverse=function(str)
  311.     local digits = {}
  312.     for digit in str:gmatch('.') do
  313.         table.insert(digits,digit)
  314.     end
  315.     local txt = ""
  316.     for i=#digits,1,-1 do
  317.         txt=txt..digits[i]
  318.     end
  319.     return txt
  320. end
  321.  
  322. string.upper=function(str)
  323.     local digits = {}
  324.     for digit in str:gmatch('.') do
  325.         table.insert(digits,digit)
  326.     end
  327.     local txt = {}
  328.     for i=1,#digits do
  329.         table.insert(txt,string.char(string.byte(digits[i])-(string.byte(digits[i])>96 and string.byte(digits[i])<122 and 32 or 0)))
  330.     end
  331.     return table.concat(txt)
  332. end
  333.  
  334. string.format=function(s,...) -- %X retorna o número string e %x não está funcionando.
  335.     local x = {...}
  336.     for i = 1,#x do
  337.         if type(x[i]) == "string" then
  338.             if s:find("%%s") then
  339.                 s = s:gsub("%%s",x[i],1)
  340.             else
  341.                 error("String expected")
  342.             end
  343.         elseif type(x[i]) == "number" then
  344.             if s:find("%%d") then
  345.                 s = s:gsub("%%d",x[i],1)
  346.             elseif s:find("%%X") then
  347.                 s = s:gsub("%%X",tostring(x[i]):sub(3),1)
  348.             elseif s:find("%%x") then
  349.                 error("%x is not able to work")
  350.             else
  351.                 error("Number expected")
  352.             end
  353.         else
  354.             error("Invalid Key")
  355.         end
  356.     end
  357.     return s
  358. end
  359.  
  360. string.rep=function(str,int,sep)
  361.     str,int,rep = str or "",int or 1,sep or ""
  362.     local txt = {}
  363.     for i = 1,int do
  364.         table.insert(txt,str)
  365.     end
  366.     return table.concat(txt,sep)
  367. end
  368.  
  369. string.lower=function(str)
  370.     local digits={}
  371.     for digit in str:gmatch('.') do
  372.         table.insert(digits,digit)
  373.     end
  374.     local txt={}
  375.     for i = 1,#digits do
  376.         table.insert(txt,string.char(string.byte(digits[i])+(string.byte(digits[i])>64 and string.byte(digits[i])<91 and 32 or 0)))
  377.     end
  378.     return table.concat(txt)
  379. end
  380.  
  381. string.sub=function(str,i,j)
  382.     i,j=i or 1,j or #str
  383.     local digits = {}
  384.     for digit in str:gmatch('.') do
  385.         table.insert(digits,digit)
  386.     end
  387.     return table.concat(digits,"",i,j)
  388. end
  389.  
  390. string.char=function(...)
  391.     local chars = [[   
  392.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������
  393. ]]
  394.     local char2 = {}
  395.     local args = {...}
  396.     for i=1,#args do
  397.         table.insert(char2,chars:sub(args[i],args[i]))
  398.     end
  399.     return table.concat(char2)
  400. end
  401.  
  402. --------------------------------------------> Tables <--------------------------------------------
  403.  
  404. table.concat=function(list,sep,i,j)
  405.     sep,i,j = sep or "",i or 1,j or #list
  406.     local txt = ""
  407.     for k,v in next,list do
  408.         if k >= i and k <= j then
  409.             txt = txt .. v .. (k~=j and sep or "")
  410.         end
  411.     end
  412.     return txt
  413. end
  414.  
  415. table.remove=function(list,pos)
  416.     local toReturn
  417.     if pos then
  418.         toReturn = list[remove]
  419.         local p = {table.unpack(list)}
  420.         for k,v in next,p do
  421.             if k>pos then
  422.                 list[k-1]=v
  423.             end
  424.         end
  425.         if pos<#list then list[#list]=nil end
  426.     else
  427.         toReturn = list[#list]
  428.         list[#list]=nil
  429.     end
  430.     return toReturn
  431. end
  432.  
  433. --------------------------------------------> Maths <--------------------------------------------
  434.  
  435. math.deg=function(x)
  436.     return x*(180/math.pi)
  437. end
  438.  
  439. math.fmod=function(x,y)
  440.     return x-math.floor(x/y)*y -- x%y
  441. end
  442.  
  443. math.asin=function(x)
  444.     if x == 0 then return 0 end
  445.     local sign = false
  446.     local temp = (1-x*x)^.5
  447.     if x>.7 then
  448.         temp = math.pi/2 - satan(temp/x)
  449.     else
  450.         temp = satan(x/temp)
  451.     end
  452.     return temp
  453. end
  454.  
  455. math.max=function(x,...)
  456.     local numbers = {x,...}
  457.     return table.sort(numbers) or numbers[#numbers]
  458. end
  459.  
  460. math.modf=function(x)
  461.     return math.floor(x),x-math.floor(x)
  462. end
  463.  
  464. math.floor=function(x)
  465.     return (x-(x%1))
  466. end
  467.  
  468. math.cosh=function(x)
  469.     if x<0 then
  470.         x = -x
  471.     end
  472.     if x>21 then
  473.         return math.exp(x)/2
  474.     end
  475.     return (math.exp(x)+math.exp(-x))/2
  476. end
  477.  
  478. math.ldexp=function(m,e)
  479.     return m*2^e
  480. end
  481.  
  482. math.atan2=function(y,x)
  483.     local q = atan(x/y)
  484.     if x == 0 then return 0 end
  485.     if x < 0 then
  486.         if q <= 0 then
  487.             return q + math.pi
  488.         end
  489.         return q - math.pi
  490.     end
  491.     return q
  492. end
  493.  
  494. math.pow=function(x,y)
  495.     return x^y
  496. end
  497.  
  498. math.abs=function(x)
  499.     return x<0 and -x or x
  500. end
  501.  
  502. math.tanh=function(x)
  503.     if x == 0 then return 0 end
  504.     local tanhP,tanhQ = {-9.64399179425052238628E-1,-9.92877231001918586564E1,-1.61468768441708447952E3},{1.12811678491632931402E2,2.23548839060100448583E3,4.84406305325125486048E3}
  505.     local MAXLOG = 8.8029691931113054295988e+01
  506.     local z = math.abs(x)
  507.     local s
  508.     if z > .5*MAXLOG then if x < 0 then return -1 end return 1 end
  509.     if z >= 0.625 then
  510.         s = math.exp(2*z)  
  511.         z = 1 - 2/(s+1)
  512.         if x<0 then z=-z end
  513.     end
  514.     s = x^2
  515.     z = x + x*s*((tanhP[1]*s+tanhP[2])*s+tanhP[3])/(((s+tanhQ[1])*s+tanhQ[2])*s+tanhQ[3])
  516.     return z
  517. end
  518.  
  519. math.acos=function(x)
  520.     return math.pi/2 - math.asin(x)
  521. end
  522.  
  523. math.tan=function(x)
  524.     local _tanP = {
  525.         -1.30936939181383777646E4,
  526.         1.15351664838587416140E6,
  527.         -1.79565251976484877988E7,
  528.     }
  529.     local _tanQ = {
  530.         1.00000000000000000000E0,
  531.         1.36812963470692954678E4,
  532.         -1.32089234440210967447E6,
  533.         2.50083801823357915839E7,
  534.         -5.38695755929454629881E7,
  535.     }
  536.     local PI4A = 7.85398125648498535156E-1
  537.     local PI4B = 3.77489470793079817668E-8
  538.     local PI4C = 2.69515142907905952645E-15
  539.     local M4PI = 1.273239544735162542821171882678754627704620361328125
  540.     local sign = false
  541.     if x < 0 then
  542.         sign = true
  543.         x = -x
  544.     end
  545.     local j = x * M4PI
  546.     local y = math.floor(j)
  547.     if j%2==1 then
  548.         j = j + 1
  549.         y = y + 1
  550.     end
  551.     local z = ((x - y*PI4A) - y*PI4B) - y*PI4C
  552.     local zz = z^2
  553.     if zz > 1e-14 then
  554.         y = z + z*(zz*(((_tanP[1]*zz)+_tanP[2])*zz+_tanP[3])/((((zz+_tanQ[2])*zz+_tanQ[3])*zz+_tanQ[4])*zz+_tanQ[5]))
  555.     else
  556.         y = z
  557.     end
  558.     if j%3==2 then
  559.         y = -1/y
  560.     end
  561.     if sign then y = -y end
  562.     return y
  563. end
  564.  
  565. math.min=function(x,...)
  566.     local numbers = {x,...}
  567.     return table.sort(numbers) or numbers[1]
  568. end
  569.  
  570. math.ceil=function(x)
  571.     return (x+1-(x%1))
  572. end
  573.  
  574. math.sinh=function(x)
  575.     local P0 = -0.6307673640497716991184787251e+6
  576.     local P1 = -0.8991272022039509355398013511e+5
  577.     local P2 = -0.2894211355989563807284660366e+4
  578.     local P3 = -0.2630563213397497062819489e+2
  579.     local Q0 = -0.6307673640497716991212077277e+6
  580.     local Q1 = 0.1521517378790019070696485176e+5
  581.     local Q2 = -0.173678953558233699533450911e+3
  582.     local sign = false
  583.     if x < 0 then
  584.         x = -x
  585.         sign = true
  586.     end
  587.     local temp
  588.     if x>21 then
  589.         temp = math.exp(x)/2
  590.     end
  591.     if x>.5 then
  592.         temp = (math.exp(x)-math.exp(-x))/2
  593.     end
  594.     local sq = x^2
  595.     temp = (((P3*sq+P2)*sq+P1)*sq + P0) * x
  596.     temp = temp / (((sq+Q2)*sq+Q1)*sq + Q0)
  597.     if sign then
  598.         temp = -temp
  599.     end
  600.     return temp
  601. end
  602.  
  603. math.sqrt=function(x)
  604.     return x^.5
  605. end
  606.  
  607. math.huge = 1/0
  608.  
  609. math.rad=function(x)
  610.     return x*(math.pi/180)
  611. end
  612.  
  613. math.randomseed = os.time()
  614.  
  615. math.random = function(m,n)
  616.     if not m then m,n = 0,1 elseif not n then m,n = 1,m end
  617.     m = m - 1; n = n + 1;
  618.     local seed = (1103515245 * math.randomseed + 12345) % (2^32)
  619.     math.randomseed = seed + 1
  620.     return math.floor(((seed%0x7FFF)/0x7FFF) * (m-n+1))+n
  621. end
  622.  
  623. math.sin=function(x) --> Há bugs
  624.     if x == 0 then return 0 end
  625.     local _sin = {
  626.         1.58962301576546568060E-10,
  627.         -2.50507477628578072866E-8,
  628.         2.75573136213857245213E-6,
  629.         -1.98412698295895385996E-4,
  630.         8.33333333332211858878E-3,
  631.         -1.66666666666666307295E-1,
  632.     }
  633.     local _cos = {
  634.         -1.13585365213876817300E-11,
  635.         2.08757008419747316778E-9,
  636.         -2.75573141792967388112E-7,
  637.         2.48015872888517045348E-5,
  638.         -1.38888888888730564116E-3,
  639.         4.16666666666665929218E-2,
  640.     }
  641.     local PI4A = 7.85398125648498535156E-1
  642.     local PI4B = 3.77489470793079817668E-8
  643.     local PI4C = 2.69515142907905952645E-15
  644.     local M4PI = 1.273239544735162542821171882678754627704620361328125
  645.     local sign = false
  646.     if x < 0 then x = -x end
  647.     local j = x * M4PI
  648.     local y = math.floor(j)
  649.     if j%2==1 then
  650.         j = j + 1
  651.         y = y + 1
  652.     end
  653.     j = j and 7
  654.     if j > 3 then
  655.         j = j - 4
  656.         sign = not sign
  657.     end
  658.     if j > 1 then
  659.         sign = not sign
  660.     end
  661.     local z = ((x - y*PI4A) - y*PI4B) - y*PI4C
  662.     local zz = z^2
  663.     if j==1 or j==2 then
  664.         y = 1 - .5*zz + zz*zz*((((((_cos[1]*zz)+_cos[2])*zz+_cos[3])*zz+_cos[4])*zz+_cos[5])*zz+_cos[6])
  665.     else
  666.         y = z + z*zz*((((((_sin[1]*zz)+_sin[2])*zz+_sin[3])*zz+_sin[4])*zz+_sin[5])*zz+_sin[6])
  667.     end
  668.     if sign then y = -y end
  669.     return y
  670. end
  671.  
  672. math.exp=function(x)
  673.     return 2.718281828459045^x
  674. end
  675.  
  676. math.cos=function(x) --> Há bugs
  677.     if x == 0 then return 0 end
  678. local _sin = {
  679.         1.58962301576546568060E-10,
  680.         -2.50507477628578072866E-8,
  681.         2.75573136213857245213E-6,
  682.         -1.98412698295895385996E-4,
  683.         8.33333333332211858878E-3,
  684.         -1.66666666666666307295E-1,
  685.     }
  686. local _cos = {
  687.         -1.13585365213876817300E-11,
  688.         2.08757008419747316778E-9,
  689.         -2.75573141792967388112E-7,
  690.         2.48015872888517045348E-5,
  691.         -1.38888888888730564116E-3,
  692.         4.16666666666665929218E-2,
  693.     }
  694.     local PI4A = 7.85398125648498535156E-1
  695.     local PI4B = 3.77489470793079817668E-8
  696.     local PI4C = 2.69515142907905952645E-15
  697.     local M4PI = 1.273239544735162542821171882678754627704620361328125
  698.     local sign = false
  699.     if x < 0 then x = -x end
  700.     local j = x * M4PI
  701.     local y = math.floor(j)
  702.     if j%2==1 then
  703.         j = j + 1
  704.         y = y + 1
  705.     end
  706.     j = j and 7
  707.     if j > 3 then
  708.         j = j - 4
  709.         sign = not sign
  710.     end
  711.     if j > 1 then
  712.         sign = not sign
  713.     end
  714.     local z = ((x - y*PI4A) - y*PI4B) - y*PI4C
  715.     local zz = z^2
  716.     if j==1 or j==2 then
  717.         y = z + z*zz*((((((_sin[1]*zz)+_sin[2])*zz+_sin[3])*zz+_sin[4])*zz+_sin[5])*zz+_sin[6])
  718.     else
  719.         y = 1 - .5*zz + zz*zz*((((((_cos[1]*zz)+_cos[2])*zz+_cos[3])*zz+_cos[4])*zz+_cos[5])*zz+_cos[6])
  720.     end
  721.     if sign then y = -y end
  722.     return y
  723. end
  724.  
  725. math.atan=function(x)
  726.     if x == 0 then return 0 end
  727.     if x > 0 then return satan(x) end
  728.     return -satan(-x)
  729. end
  730.  
  731. math.pi = 3.1415927
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement