math.ceil
From ComputerCraft
Jump to: navigation, search
math.ceil Function | |
---|---|
Syntax math.ceil(
| |
Returns | number |
API | math |
Source | Lua (source) |
Return num rounded to the next whole integer.
|
|||
Read a line from the user, then print the ceiling of the number they entered. | |||
Code | print(math.ceil(tonumber(read())))
|
||
Output | Depends on what the user wrote. For instance, if they were to enter 0.2 , the number printed would be 1 . |
Retrieved from ‘https://wiki.computercraft.cc/index.php?title=Math.ceil&oldid=3319’