1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:18:13 +00:00

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
parent 4d9f2bf5f1
commit 7dcf060927

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