📜  统一显示浮点数的小数位数 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:04.060000             🧑  作者: Mango

代码示例1
// You can use .ToString("f2") to show 2 decimals of "f3" to show 3, etc.
float num = 123.24523;

Debug.Log(num.ToString("f2")); // Output: 123.24