math.asin

From ComputerCraft
Jump to: navigation, search

math.asin
Function
Syntax
math.asin()
Returns number
API math
Source Lua (source)

Returns the arcsine of num.

ExampleExamplePrint the arcsine of user input
Read a line from the user, compute its sine, and print the result in radians and degrees.
Code
local num = math.asin(tonumber(read()))
print(num)
print(math.deg(num))
Output Depends on what the user wrote. For instance, if they were to enter 0.5, the numbers printed would be 0.523598776 () and 30.