pavel-drobushevich/blog-examples — pull request #1 by DNNX (2013-12-30 14:56:04+00:00)
Title: Fixing comparison of Double values

`(int)(double1 - double2)` is not the right way to write a comparator for doubles. It fails when the absolute difference between `double1` and `double2` is less than 1. [Double.compare(double, double)](http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html#compare(double, double)) is a better choice.