Skip to main content

math.sqrt(value)

Returns the square root of a given value

Availability

Device + Agent

Parameters

Name Type Description
value Float/integer Any positive numerical value

Returns

Float — the square root

Description

This function returns the square root of the passed value. If the value passed is negative, Squirrel will return the value -nan — Not A Number as defined by the IEEE 754 standard for floating-point math.

Example Code