mirror of https://github.com/apache/poi.git
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
9350ef41d4
commit
5588a1c136
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue