Skip to main content
Version: 1.0.0

squareRoot

squareRoot* ( number : number) : number

ParameterTypeDescription
numbernumberNumber whose square root is calculated
ResultnumberSquare root of the number

Description

squareRoot returns the square root of number.

Example 1

The following example assigns the value 1.414213562373 to the variable vrSquareRootOfTwo.

 var vrSquareRootOfTwo : number
vrSquareRootOfTwo = squareRoot(2)

Example 2

The following method returns the hypotenuse of the right triangle whose two legs are passed as parameters:

 declare ( legA : number , legB : number) -> hypothenuse : number
hypothenuse: = squareRoot((legA^2)+(legB^2))