typischmann / retail-crm

2 stars 1 forks source link

We should use BidDecimal instead of Float data type in the entity mapping #27

Open typischmann opened 9 years ago

typischmann commented 9 years ago

The equality comparison between two float should be written as follows: if( (f1-f2)<epsilon){ ....... }

The epsilon should be a very small value, like 0.0000001

The equality comparison between two BigDecimal can be written as follows: if( bd1.compareTo(db2) == 0 ){ }