math.deg
math.deg Function | |
---|---|
Syntax math.deg(
| |
Returns | number |
API | math |
Source | Lua (source) |
Convert the number num from radians to degrees.
|
|||
Read a line from the user, compute its arcsin, then convert it to degrees. | |||
Code | <nowiki>
print(math.deg(math.asin(tonumber(read()))))
</nowiki>
|
||
Output | Depends on what the user wrote. For instance, if they were to enter -1 , the number printed would be -90 . |
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.