Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rule 13.3 with respect to 0.0
#1
Does rule 13.3 permit testing a floating point expression against 0.0?
Code:
void f( float flt )
{
if( flt == 0.0 )
    {}
}

If not, how is this test any different than
Code:
void f( float flt )
{
if( !flt )
    {}
}
?

Or does 13.3 not permit the second example either?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)