From adcc865c7018011240378c2b8ac21e255aa6e26e Mon Sep 17 00:00:00 2001 From: WraithGlade <8360085+WraithGlade@users.noreply.github.com> Date: Sun, 19 Mar 2023 22:06:39 -0400 Subject: [PATCH] Fixed incorrect precision value in `fmt` doc. It seems like `%.2f` is the correct implementation of "precision 2" for displaying floats, not `$.3f`. It prints two decimal places. Either that or the next case (`%8.3f`) would be wrong instead, if it's the other way around. So, there's a mistake here one way or the other at the least. --- core/fmt/doc.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/fmt/doc.odin b/core/fmt/doc.odin index 668fc9bc6..991058661 100644 --- a/core/fmt/doc.odin +++ b/core/fmt/doc.odin @@ -68,7 +68,7 @@ A period with no following number specifies a precision of 0. Examples: %f default width, default precision %8f width 8, default precision - %.3f default width, precision 2 + %.2f default width, precision 2 %8.3f width 8, precision 3 %8.f width 8, precision 0