I use this operation in a loop that is called frequently.
I think using String
intercepting and BigDecimal
will produce a large number of objects, so it"s not appropriate
what I"m doing now is
float total = total;
int left = ((int) (total));
int right = (int) ((total - left)*100);
this way to avoid generating a large number of objects, one problem is that it is not well rounded. Is there any other efficient way?