math.sqrt

From ComputerCraft
Jump to: navigation, search

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

Returns the square root of num.

ExampleExamplePrint the square root of 2.
Prints an approximation of .
Code
print(math.sqrt(2))
Output 1.4142135623731