Esempio n. 1
0
 void FormatFixed()
 {
     #region PressureTypeDemo2_FormatFixed
     Debug.Log(PressureType.Format(1234.5678, format: "0.0000"));
     // Prints: "1234.5678 kPa"
     Debug.Log(PressureType.Format(1234.5678, format: "0.00"));
     // Prints: "1234.57 kPa"
     Debug.Log(PressureType.Format(1234.5678, format: "#,##0.00"));
     // Prints: "1,234.57 kPa"
     #endregion
 }
Esempio n. 2
0
 void FormatDefault()
 {
     #region PressureTypeDemo2_FormatDefault
     Debug.Log(PressureType.Format(0.051));
     // Prints: "Pressure is: 0.051 kPa"
     Debug.Log(PressureType.Format(0.45));
     // Prints: "Pressure is: 0.45 kPa"
     Debug.Log(PressureType.Format(95.45));
     // Prints: "Pressure is: 95.5 kPa"
     Debug.Log(PressureType.Format(120.45));
     // Prints: "Pressure is: 121 kPa"
     Debug.Log(PressureType.Format(9535.45));
     // Prints: "Pressure is: 9,536 kPa"
     #endregion
 }