MathIsValidNumber
MathIsValidNumber
此函数用于检查实数是否正确。
bool MathIsValidNumber(
double number // number to check
);参数
- number
[in] 要检查的数值。
返回值
如果检查的值是一个有效的实数,则返回 true。如果检查的值是正无穷、负无穷或“非数字”(NaN),则函数返回 false。
示例:
double abnormal=MathArcsin(2.0);
if(!MathIsValidNumber(abnormal)) Print("Attention! MathArcsin(2.0) = ",abnormal);相关链接
最后更新于