mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
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…
x
Reference in New Issue
Block a user