最佳答案
我有一个 if
表达式,
void Foo()
{
System.Double something = GetSomething();
if (something == 0) //Comparison of floating point numbers with equality
// operator. Possible loss of precision while rounding value
{}
}
这个表达式等于
void Foo()
{
System.Double something = GetSomething();
if (something < 1)
{}
}
? 因为那样我可能会有问题,输入 if
,例如值为0.9。