Trying to develop my own function I have realized that when having a currency amount the analytics website shows it with no decimal positions, even for small amounts.
Checking the code I have found that the DoubleValueSizeBasedDecimalPlaceFormatter, which seems to be the responsible of formatting, computes a bad scale (line 33 in the class):
int scale = Math.abs(value.longValue()) > _threshold ? _largeNumberDecimalPlaces : _smallNumberDecimalPlaces;
For this code and considering the default initialization CCY_DEFAULT (line 17 in the class), if value is 100.1234 the scale variable is _largeNumberDecimalPlaces (that is 0), since a long value is being compared numerically with the threshold (10 for this case). Maybe it should compared String.valueOf(value.longValue()).size() > _threshold.
Is this a bug or I’m missing anything? Thanks for your help.