Answers for "compare float cpp"

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

Browse Popular Code Answers by Language