ICU-6354 Set default rounding increment, C implementation
X-SVN-Rev: 25241
This commit is contained in:
parent
1b5ba9ed42
commit
de7d1f06de
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1997-2008, International Business Machines Corporation and *
|
||||
* Copyright (C) 1997-2009, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
@ -57,6 +57,7 @@
|
||||
#include "umutex.h"
|
||||
#include "uassert.h"
|
||||
#include "putilimp.h"
|
||||
#include <math.h>
|
||||
|
||||
U_NAMESPACE_BEGIN
|
||||
|
||||
@ -2175,6 +2176,9 @@ DecimalFormat::ERoundingMode DecimalFormat::getRoundingMode() const {
|
||||
*/
|
||||
void DecimalFormat::setRoundingMode(ERoundingMode roundingMode) {
|
||||
fRoundingMode = roundingMode;
|
||||
if (fRoundingIncrement == NULL) {
|
||||
setRoundingIncrement(pow(10.0, -getMaximumFractionDigits()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user