math.tan
|
|||
Read a line from the user, convert it to radians using math.rad, then print its tangent. | |||
Code | <nowiki>
print(math.tan(math.rad(tonumber(read())))
</nowiki>
|
||
Output | Depends. If the user wrote 45 , the output would be 1 . |
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
math.tan Function | |
---|---|
Syntax math.tan(
| |
Returns | number |
API | math |
Source | Lua (source) |
Returns the tangent of num.
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.