예제 #1
0
 void FormatFixed()
 {
     #region CostTypeDemo2_FormatFixed
     Debug.Log(CostType.Format(1234.5678, format: "0.0000"));
     // Prints: "√ 1234.5678"
     Debug.Log(CostType.Format(1234.5678, format: "#,##0.00"));
     // Prints: "√ 1,234.57"
     #endregion
 }
예제 #2
0
 void FormatDefault()
 {
     #region CostTypeDemo2_FormatDefault
     Debug.Log(CostType.Format(0.4));
     // Prints: "Cost is: √ 0.40"
     Debug.Log(CostType.Format(0.41));
     // Prints: "Cost is: √ 0.41"
     Debug.Log(CostType.Format(1.0));
     // Prints: "Cost is: √ 1.00"
     Debug.Log(CostType.Format(1.41));
     // Prints: "Cost is: √ 1.41"
     Debug.Log(CostType.Format(1234.555));
     // Prints: "Cost is: √ 1,234.56"
     #endregion
 }