[英]How to print F32 with 1 dec place and a fixed width in rust
Trying to replicate the following C printf invocation尝试复制以下 C printf 调用
printf("%6.1f %6.1f %6.1f\n", x, y, z);
in rust and I can't find it in the docs.在 rust 中,我在文档中找不到它。 I need 6 positions wide with 1 decimal place.
我需要 6 个位置宽 1 个小数位。
First time I've been stumped finding what I need there.我第一次在那里很难找到我需要的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.