Answers for "how to compare integer with float in c++"

1

compare float values c++

bool cmpf(float A, float B, float epsilon = 0.005f)
{ 
    return (fabs(A - B) < epsilon);
}
Posted by: Guest on May-19-2021

Code answers related to "how to compare integer with float in c++"

Browse Popular Code Answers by Language