Math LibraryDefines that all trigonometric functions in math use the radian exponent and the logarithmic function to take the integer function pseudo-random number math.random call when there is no parameter to return a random real call between 0~1 when only one integer parameter n, then returns a random integer between 1~n When called if there are two integer arguments m,n, the random integer between m~n is returned Math.randomseed can set the pseudo-random number seed math.random using the RAND function of C is the mathematical constant pi representing the circle Frequency huge represents the maximum number
Table LibraryTable.insert inserts an element into the data specified position it moves subsequent elements to empty space T = {10,20,30}
Table.insert (t, 1, +)--t = {15, 10, 20, 30} If there is no positional parameter (the second argument), the element will be inserted at the end of the array table.remove Delete the element at the specified position in the array and Move all elements behind the position without specifying a positional argument the last element table.sort the array first returns true Table.concat all strings in the array of connection strings before the second one There is one parameter that specifies the delimiter to be inserted between each string
LUA Learning notes (13)