From 7dcf0609279e7af386b78cec3722e26208a1dd8c Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Sun, 3 Mar 2024 07:56:20 -0700 Subject: [PATCH] LibWeb: Limit ratio parts to 5 decimal places when printing Printing 15 or so decimal places for each value is a bit excessive --- Userland/Libraries/LibWeb/CSS/Ratio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/CSS/Ratio.cpp b/Userland/Libraries/LibWeb/CSS/Ratio.cpp index 7b8c54c94f..e3b7efae59 100644 --- a/Userland/Libraries/LibWeb/CSS/Ratio.cpp +++ b/Userland/Libraries/LibWeb/CSS/Ratio.cpp @@ -24,7 +24,7 @@ bool Ratio::is_degenerate() const String Ratio::to_string() const { - return MUST(String::formatted("{} / {}", m_first_value, m_second_value)); + return MUST(String::formatted("{:.5} / {:.5}", m_first_value, m_second_value)); } }