Math cosh x returns the hyperbolic cosine of x.
Lua math floor.
Math cos x returns the cosine of x assumed to be in radians.
Math floor x returns the largest integer smaller than or equal to x.
The list of functions availa.
Equal seeds produce equal sequences of numbers.
The function uses a perlin noise algorithm to assign fixed values to coordinates.
Returns a perlin noise value between 1 and 1.
Number math noise number x number y 0 number z 0.
Function round num numdecimalplaces local mult 10 numdecimalplaces or 0 return math floor num mult 0 5 mult end.
In other case lua casts upperinto an integer sometimes giving math floor upper and others math ceil upper with unexpected results the same for lower.
Use function div a b return a a b b end.
Math ceil x returns the smallest integer larger than or equal to x.
The following function rounds a number to the given number of decimal places.
Math randomseed 1234 math random math random math random.
Here is an alternative implementation.
Math floor null returns 0 not a nan.
Math deg x returns the angle x given in radians in degrees.
Lua math library we often need math operations in scientific and engineering calculations and we can avail this using the standard lua library math.
The floor method rounds a number downwards to the nearest integer and returns the result.
To get an integer result during a division.
If the passed argument is an integer the value will not be rounded.
Math exp x returns the value e power x.
Math floor x returns the largest integer smaller than or equal to x.