Multiplies a number by an other.
Computercraft math floor.
5 3 returns 8 subtraction.
5 into 5 and positive numbers remain unaffected.
For instance if they were to enter 0 2 the number printed would be 0.
Arithmetics are traditional number operations such as addition subtraction multiplication division and more derivatives.
The number s distance from zero.
Equal seeds produce equal sequences of numbers.
The lua core is capable of the following arithmetics.
Math is a default lua 5 1 api defined here please list any non working functions below.
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.
Play a sound with the given volume and pitch.
See networking for more information.
At some point while coding you will most likely want to run some code multiple times without writing out a lot of code.
Adds two numbers to each other.
Welcome to the new computercraft wiki.
The math randomseed function sets a seed for the pseudo random generator.
Rednet is not secure against interception or spoofing.
You can request an account here make sure to follow the contributing guidelines when editing.
This means that negative numbers will be converted to a positive number e g.
This wiki is still heavily under construction and any help is appreciated.
While it is true that functions can shorten your code there may be situations where even those don t simplify it enough.
List of non working functions.
This function call requires a modem peripheral to be attached to the computer.
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.
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.
The return value will always be a positive number.
Return the absolute value of num i e.
Depends on what the user wrote.