[英]How to get a raw pointer *mut f32 from a rust vector Vec<[f32;3]>?
[英]How to print F32 with 1 dec place and a fixed width in rust
嘗試復制以下 C printf 調用
printf("%6.1f %6.1f %6.1f\n", x, y, z);
在 rust 中,我在文檔中找不到它。 我需要 6 個位置寬 1 個小數位。
我第一次在那里很難找到我需要的東西。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.