double value1 = 3.1415926;
double value2 = 3.1415920;
if(qFuzzyCompare(value1,value2))
{
//相等
qDebug() << "相等";
}
else
{
//不相等
qDebug() << "不相等";
}
2023-11-20 13:06:28
double value1 = 3.1415926;
double value2 = 3.1415920;
if(qFuzzyCompare(value1,value2))
{
//相等
qDebug() << "相等";
}
else
{
//不相等
qDebug() << "不相等";
}
下一篇:编译解释