![]() ![]() rounds a number to the nearest nth decimal, if the 2nd parameter is 2, the number can look like 3.14 but not 3.Purpose: rounds a number to the nearest decimal (d) Local z = module.floor(2.7182818,-1) - z = 0 (2 rounded down to the nearest 10 is 0 rounds a number down to the nearest nth decimal, if the 2nd parameter is 2, the number can look like 3.14 but not 3.1415Įxample: local x = module.floor(3.141592653589,3) - x = 3.141.Number - Decimal place to round down to. ![]() Purpose: rounds a number down to the nearest decimal (d) Calculates the smallest number which the two parameters can both divide intoĮxample: local x = module.lcm(45,10) - x = 90.Calculates the number which can divide evenly into both parametersĮxample: local x = module.gcd(45,10) - x = 5. ![]() The math functions that don’t really fit a category Purpose: Calculate the Standard Deviation of a Data Set Local z = module.flip(.01) - z is most likely going to be false due to a 1% chance Local y = module.flip(.98) - y is likely going to be true due to a 98% chance 15, you are likely to return false.Įxample: local x = module.flip(.5) - x is true or false due to a 50-50 chance 85, you are likely to return true, but uncertain. 5, you have the same chance of getting true as false. standard C math library, providing all of its functions inside the math table.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |