Correct fraction formatting quick return logic

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1231144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2012-01-13 16:03:17 +00:00
parent 9350ef41d4
commit 5588a1c136
1 changed files with 1 additions and 1 deletions

View File

@ -983,7 +983,7 @@ public class DataFormatter {
public String format(Number num) {
double wholePart = Math.floor(num.doubleValue());
double decPart = num.doubleValue() - wholePart;
if (wholePart * decPart == 0) {
if (wholePart + decPart == 0) {
return "0";
}