I want to test if float value is equal to 0.00 or 0.0 and I wanted to know how to correctly test my variables so please correct me if I'm wrong :
int main()
{
float x1 = -105.00;
float x2 = 7.00;
float x3 = 2.00;
if((x1 == 0.0f || x1 == 0.0))
{
if((x2 == 0.0f || x2 == 0.0))
{
if((x3 == 0.0f || x3 == 0.0))
{
printf("full null\r\n");
}
}
}
}
So I wanted to know if it is the best way to test float in c.