As Ray suggests, just use a float. That's what I get for cutting and pasting

code.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@2604 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
samskivert
2009-07-31 21:44:13 +00:00
parent ca20f3efe6
commit e721f79227
@@ -78,7 +78,7 @@ public class CurrencyTool
*/
public String penniesToDollars (int pennies)
{
float decimal = (float)(pennies / 100.0);
float decimal = pennies / 100f;
// if the pennies is a whole number of dollars, then we return just the string number
if (pennies % 100 == 0) {
return String.format("%.0f", decimal);