Added a helper static class to deal with floating point issues.