I have used
Class CheckFloat {
float floatVal;
public boolean isFloatZero(){
return floatVal==0.0f;
}
}
Is there a better way of doing it?
I have used
Class CheckFloat {
float floatVal;
public boolean isFloatZero(){
return floatVal==0.0f;
}
}
Is there a better way of doing it?
easily by some checking you can do it First if(floatVal==0) sop("it is zero") Second float b=floatVal; if(b/floatVal!=1) sop("it is zero"); But you should be also aware about the divide by zero error here.