In other case lua casts upper into an integer sometimes giving math floor upper and others math ceil upper with unexpected results the same for lower.
Computercraft math floor.
Math is a default lua 5 1 api defined here please list any non working functions below.
Adds two numbers to each other.
The number s distance from zero.
This means that negative numbers will be converted to a positive number e g.
5 3 returns 8 subtraction.
At some point while coding you will most likely want to run some code multiple times without writing out a lot of code.
The math randomseed function sets a seed for the pseudo random generator.
See networking for more information.
You can request an account here make sure to follow the contributing guidelines when editing.
The return value will always be a positive number.
Welcome to the new computercraft wiki.
If you want to mark a page as your own to edit it later to avoid other people creating the same page as you feel free to pre create the page with the contents.
Depends on what the user wrote.
Equal seeds produce equal sequences of numbers.
While it is true that functions can shorten your code there may be situations where even those don t simplify it enough.
Subtracts a number from an other number.
This function call requires a modem peripheral to be attached to the computer.
List of non working functions.
Return the absolute value of num i e.
5 into 5 and positive numbers remain unaffected.
Multiplies a number by an other.
The sound name corresponds to a resource name in sound json file for instance minecraft entity player levelup is the sound one hears when leveling up.
The lua core is capable of the following arithmetics.
5 3 returns 2 multiplication.
For instance if they were to enter 0 2 the number printed would be 0.
Broadcasts a string message over the predefined rednet channel broadcast channel default 65535 assuming rednet has been opened the message will be received by every device listening to rednet.
Rednet is not secure against interception or spoofing.