rc 1.0
This commit is contained in:
@@ -7,8 +7,15 @@ public static class CoinHelper
|
||||
return float.Parse(whole + "." + fraction);
|
||||
}
|
||||
|
||||
public static int RcToCoins(float coins){
|
||||
string s = coins.ToString("N1");
|
||||
int whole = int.Parse(s.Split('.')[0]);
|
||||
int fraction = int.Parse(s.Split('.')[1]);
|
||||
return (whole * 4) + fraction;
|
||||
}
|
||||
|
||||
public static string FormatString(int coins)
|
||||
{
|
||||
return Format(coins).ToString("N2");
|
||||
return Format(coins).ToString("N1");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user