@shipit wrote:
hey guys, what's the proper way to do floating point compare?
this:
if (rect1.getMinX() == rect2.getMinX() { // do something }
or:
if (fabsf(rect1.getMinX() - rect2.getMinX()) == FLT_EPSILON) { // do something }
??
Posts: 4
Participants: 2