소수점 1자리까지 표시

This commit is contained in:
Ino 2026-01-09 15:01:44 +09:00
parent 4ec263d60b
commit eb8d24fa83
2 changed files with 5 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class MiniGameResult : MonoBehaviour
m_rubyAmount.Obfuscate(); m_rubyAmount.Obfuscate();
texts[0].text = maxCombo.ToString(); texts[0].text = maxCombo.ToString();
texts[1].text = DSUtil.GetCommaText_N2(maxCombo / 100f) + "%"; texts[1].text = DSUtil.GetCommaText_N1(maxCombo / 100f) + "%";
//texts[2].text = ""; //texts[2].text = "";
texts[5].text = rubyAmount.ToString(); texts[5].text = rubyAmount.ToString();
texts[3].text = coinAmount.ToString(); texts[3].text = coinAmount.ToString();

View File

@ -729,6 +729,10 @@ public static partial class DSUtil
if (_incluePercent) return Format("{0:#,##0}%", data); if (_incluePercent) return Format("{0:#,##0}%", data);
else return Format("{0:#,##0}", data); else return Format("{0:#,##0}", data);
} }
public static string GetCommaText_N1(double data)
{
return Format("{0:#,##0.#}", data);
}
public static string GetCommaText_N2(double data) public static string GetCommaText_N2(double data)
{ {
return Format("{0:#,##0.##}", data); return Format("{0:#,##0.##}", data);