LibWeb: Limit ratio parts to 5 decimal places when printing

Printing 15 or so decimal places for each value is a bit excessive
This commit is contained in:
Matthew Olsson 2024-03-03 07:56:20 -07:00 committed by Alexander Kalenik
commit 7dcf060927
Notes: sideshowbarker 2024-07-16 23:08:48 +09:00

View file

@ -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));
}
}