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:
parent
24b020cb12
commit
6c37e2c672
@ -983,7 +983,7 @@ public class DataFormatter {
|
|||||||
public String format(Number num) {
|
public String format(Number num) {
|
||||||
double wholePart = Math.floor(num.doubleValue());
|
double wholePart = Math.floor(num.doubleValue());
|
||||||
double decPart = num.doubleValue() - wholePart;
|
double decPart = num.doubleValue() - wholePart;
|
||||||
if (wholePart * decPart == 0) {
|
if (wholePart + decPart == 0) {
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user