Skip to content
drewmccluskey edited this page Jan 14, 2019 · 4 revisions

sqrt

Returns the square root of the input value. Value cannot be a negative value.

Syntax:

sqrt(x)
Argument Description
double x The number to get the square root of

Returns: double

Description:

Takes the square root of an input and returns it. The input value cannot be a negative value and should be checked before obtaining the square root by using the sign() function.

Example:

var squareRootValue = sqrt(25); //return 5

This code will set var squareRootValue to the square root of 25 which is 5.

Back to number_functions

Clone this wiki locally