sqrt( num )
Calculates the square root of a number.
The number. Must be positive.

The sqrt() function calculates the square root of a positive number.

When given a negative number, sqrt() returns a result, but it isn't useful.

Examples Edit

print(sqrt(9))     -- 3
print(sqrt(0.25))  -- 0.5

See also Edit

Community content is available under CC-BY-SA unless otherwise noted.