我会格式化一个浮点数的机器人与点后的2位数。 我搜索的例子,但我din't找到一个。
可以有一个人帮助我。
解决方案 浮动F = 2.3455f;
字符串测试=的String.Format(%02F,F);
I will Format a Floating Point Number in android with 2 Digits after the point. I search for a Example but i din´t find one.
Can some one help me.
解决方案float f = 2.3455f;
String test = String.format("%.02f", f);