7

Another reason to hate Java

It seems that Java is immune to OR 1=1, because of course, 1.0 is not the same as 1.0;

Comments
  • 2
    Never compare doubles with ==,
    Rache do something like Math. abs(a-b) <= e where e is the allowed error
  • 1
    @moars42 I didn't, is a DoubleProperty from the JavaFX framework
  • 1
    If you set the tolerance to 0, weird things are bound to happen. That's just how floating point numbers work.
  • 1
    @3141 thanks bro I resolved with another property
Add Comment