isinf()
Indicates whether the returned value of a mathematical function is an infinite value.
Synopsis
bool isinf(double x);
Parameters
Parameter | Description |
---|---|
x | Value to be checked. |
Return value
Returns TRUE, if the "x" value is +/- infinite.
Description
Indicates whether the returned value of a mathematical function is an infinite value.
Mathematical functions like asin(2) can return infinite values as result, whereby the result is set to 0 in CTRL. In some events, however, this value was valid, but the script has no possibility to verify whether the arguments were invalid. This function allows determining whether the value is really invalid or unfortunately an infinite value.
Example
main()
{
float f;
f=asin(2);
DebugN(isinf(f)); // Returns TRUE
}
Assignment
Mathematical function
Availability
CTRL