math.sqrt

math.sqrt
Function
Syntax
math.sqrt(
  • num : number
)

Returns number
API math
Source Lua (source)

Returns the square root of num.

ExamplePrint the square root of 2.
Prints an approximation of .
Code
<nowiki>
print(math.sqrt(2))
    </nowiki>
Output 1.4142135623731
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.