floatsqroot()
Description
Return the square root of a value.
Syntax
floatsqroot(value);
Parameters
Variable | Input |
|---|---|
| The value to calculate the square root of. |
Returns
The result: the square root of the input number.
Function call example
Float type numbers square root example
new data1=10;
new Float: data2;
new Float: root;
main(){
data2 = float(data1); //first convert previous data into floating point if it wasn't before
root = floatsqroot(data2); //the result will be: root = 3.1622776
while(1){
Delay(100);
}
}Notes and Warnings
This function raises a “domain” error is the input value is negative