sqrt()

The mathLib.sqrt() math function returns the square root of a number. The function operates on any number that is greater than or equal to zero.

Syntax

  mathLib.sqrt(numericVariable FLOAT in)
  returns (result FLOAT)
numericVariable
Input can be any variable or expression that is assignment compatible with the FLOAT type (see "Assignment compatibility in EGL").
result
A FLOAT value.

Example

  myVar INT=4;
  result ANY;

  result = mathLib.sqrt(myVar);
  // result=2.0 (output is FLOAT)

Feedback