double value1 = 3.1415926;
double value2 = 3.1415920;
if(qFuzzyCompare(value1,value2))
{
//相等
qDebug() << "相等";
}
else
{
//不相等
qDebug() << "不相等";
}
2023-11-16 21:41:16
double value1 = 3.1415926;
double value2 = 3.1415920;
if(qFuzzyCompare(value1,value2))
{
//相等
qDebug() << "相等";
}
else
{
//不相等
qDebug() << "不相等";
}